Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/transcoding/registerallocmode.ll

raw
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 ; CHECK-LLVM: @[[FLAG2:[0-9]+]] = private unnamed_addr constant [20 x i8] c"num-thread-per-eu 4\00", section "llvm.metadata"
16 ; CHECK-LLVM: @[[FLAG3:[0-9]+]] = private unnamed_addr constant [20 x i8] c"num-thread-per-eu 8\00", section "llvm.metadata"
17
18 ; CHECK-LLVM: @llvm.global.annotations = appending global [4 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 }, { ptr, ptr, ptr, i32, ptr } { ptr @main_l3, ptr @[[FLAG2]], ptr undef, i32 undef, ptr undef }, { ptr, ptr, ptr, i32, ptr } { ptr @main_l6, ptr @[[FLAG3]], ptr undef, i32 undef, ptr undef }], section "llvm.metadata"
19
20 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"
21 target triple = "spir64"
22
23 ; Function Attrs: noinline nounwind optnone
24 define weak dso_local spir_kernel void @main_l3() #0 !RegisterAllocMode !10 {
25 newFuncRoot:
26 ret void
27 }
28
29 ; Function Attrs: noinline nounwind optnone
30 define weak dso_local spir_kernel void @main_l6() #0 !RegisterAllocMode !11 {
31 newFuncRoot:
32 ret void
33 }
34
35 ; Function Attrs: noinline nounwind optnone
36 define weak dso_local spir_kernel void @main_l9() #0 !RegisterAllocMode !12 {
37 newFuncRoot:
38 ret void
39 }
40
41 ; Function Attrs: noinline nounwind optnone
42 define weak dso_local spir_kernel void @main_l13() #0 !RegisterAllocMode !13 {
43 newFuncRoot:
44 ret void
45 }
46
47 ; Function Attrs: noinline nounwind optnone
48 define weak dso_local spir_kernel void @main_l19() #0 {
49 newFuncRoot:
50 ret void
51 }
52
53 attributes #0 = { noinline nounwind optnone }
54
55
56 !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}
57 !spirv.Source = !{!2, !3, !3, !3, !3, !3, !2, !3, !2, !2, !2, !2, !2, !2, !2, !2, !2, !2, !2, !2, !2, !2}
58 !llvm.module.flags = !{!4, !5, !6, !7, !8}
59 !spirv.MemoryModel = !{!9, !9, !9, !9, !9, !9}
60 !spirv.ExecutionMode = !{}
61
62 !0 = !{}
63 !2 = !{i32 4, i32 200000}
64 !3 = !{i32 3, i32 200000}
65 !4 = !{i32 1, !"wchar_size", i32 4}
66 !5 = !{i32 7, !"openmp", i32 50}
67 !6 = !{i32 7, !"openmp-device", i32 50}
68 !7 = !{i32 8, !"PIC Level", i32 2}
69 !8 = !{i32 7, !"frame-pointer", i32 2}
70 !9 = !{i32 2, i32 2}
71 !10 = !{i32 2}
72 !11 = !{i32 1}
73 !12 = !{i32 0}
74 !13 = !{i32 3}