|
| 1 | +; RUN: llvm-as %s -o %t.bc |
| 2 | +; RUN: llvm-spirv -spirv-text %t.bc -o - | FileCheck %s --check-prefix=CHECK-SPIRV |
| 3 | +; RUN: llvm-spirv %t.bc -o %t.spv |
| 4 | +; RUN: spirv-val %t.spv |
| 5 | +; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o - | llvm-dis -o - | FileCheck %s --check-prefix=CHECK-LLVM |
| 6 | + |
| 7 | +; CHECK-SPIRV: 8 Decorate 4 UserSemantic "num-thread-per-eu 4" |
| 8 | +; CHECK-SPIRV: 8 Decorate 6 UserSemantic "num-thread-per-eu 8" |
| 9 | +; CHECK-SPIRV-NOT: 8 Decorate 8 |
| 10 | +; CHECK-SPIRV-NOT: 8 Decorate 10 |
| 11 | +; CHECK-SPIRV-NOT: 8 Decorate 12 |
| 12 | + |
| 13 | +; CHECK-LLVM: @[[FLAG0:[0-9]+]] = private unnamed_addr constant [20 x i8] c"num-thread-per-eu 4\00", section "llvm.metadata" |
| 14 | +; CHECK-LLVM: @[[FLAG1:[0-9]+]] = private unnamed_addr constant [20 x i8] c"num-thread-per-eu 8\00", section "llvm.metadata" |
| 15 | + |
| 16 | +; CHECK-LLVM: @llvm.global.annotations = appending global [2 x { ptr, ptr, ptr, i32, ptr }] [{ ptr, ptr, ptr, i32, ptr } { ptr @main_l3, ptr @[[FLAG0]], ptr undef, i32 undef, ptr undef }, { ptr, ptr, ptr, i32, ptr } { ptr @main_l6, ptr @[[FLAG1]], ptr undef, i32 undef, ptr undef }], section "llvm.metadata" |
| 17 | + |
| 18 | +target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" |
| 19 | +target triple = "spir64" |
| 20 | + |
| 21 | +; Function Attrs: noinline nounwind optnone |
| 22 | +define weak dso_local spir_kernel void @main_l3() #0 !RegisterAllocMode !10 { |
| 23 | +newFuncRoot: |
| 24 | + ret void |
| 25 | +} |
| 26 | + |
| 27 | +; Function Attrs: noinline nounwind optnone |
| 28 | +define weak dso_local spir_kernel void @main_l6() #0 !RegisterAllocMode !11 { |
| 29 | +newFuncRoot: |
| 30 | + ret void |
| 31 | +} |
| 32 | + |
| 33 | +; Function Attrs: noinline nounwind optnone |
| 34 | +define weak dso_local spir_kernel void @main_l9() #0 !RegisterAllocMode !12 { |
| 35 | +newFuncRoot: |
| 36 | + ret void |
| 37 | +} |
| 38 | + |
| 39 | +; Function Attrs: noinline nounwind optnone |
| 40 | +define weak dso_local spir_kernel void @main_l13() #0 !RegisterAllocMode !13 { |
| 41 | +newFuncRoot: |
| 42 | + ret void |
| 43 | +} |
| 44 | + |
| 45 | +; Function Attrs: noinline nounwind optnone |
| 46 | +define weak dso_local spir_kernel void @main_l19() #0 { |
| 47 | +newFuncRoot: |
| 48 | + ret void |
| 49 | +} |
| 50 | + |
| 51 | +attributes #0 = { noinline nounwind optnone } |
| 52 | + |
| 53 | + |
| 54 | +!opencl.compiler.options = !{!0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0} |
| 55 | +!spirv.Source = !{!2, !3, !3, !3, !3, !3, !2, !3, !2, !2, !2, !2, !2, !2, !2, !2, !2, !2, !2, !2, !2, !2} |
| 56 | +!llvm.module.flags = !{!4, !5, !6, !7, !8} |
| 57 | +!spirv.MemoryModel = !{!9, !9, !9, !9, !9, !9} |
| 58 | +!spirv.ExecutionMode = !{} |
| 59 | + |
| 60 | +!0 = !{} |
| 61 | +!2 = !{i32 4, i32 200000} |
| 62 | +!3 = !{i32 3, i32 200000} |
| 63 | +!4 = !{i32 1, !"wchar_size", i32 4} |
| 64 | +!5 = !{i32 7, !"openmp", i32 50} |
| 65 | +!6 = !{i32 7, !"openmp-device", i32 50} |
| 66 | +!7 = !{i32 8, !"PIC Level", i32 2} |
| 67 | +!8 = !{i32 7, !"frame-pointer", i32 2} |
| 68 | +!9 = !{i32 2, i32 2} |
| 69 | +!10 = !{i32 2} |
| 70 | +!11 = !{i32 1} |
| 71 | +!12 = !{i32 0} |
| 72 | +!13 = !{i32 3} |
0 commit comments