Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/dominator-order.ll

raw
1 ; RUN: llvm-as %s -o %t.bc
2 ; RUN: llvm-spirv %t.bc -spirv-text -o %t
3 ; RUN: FileCheck < %t %s
4 ; RUN: llvm-spirv %t.bc -o %t.spv
5 ; RUN: spirv-val %t.spv
6
7 ; This test checks that basic blocks are reordered in SPIR-V so that dominators
8 ; are emitted ahead of their dominated blocks as required by the SPIR-V
9 ; specification.
10
11 ; CHECK-DAG: Name [[#ENTRY:]] "entry"
12 ; CHECK-DAG: Name [[#FOR_BODY137_LR_PH:]] "for.body137.lr.ph"
13 ; CHECK-DAG: Name [[#FOR_BODY:]] "for.body"
14
15 ; CHECK: Label [[#ENTRY]]
16 ; CHECK: Label [[#FOR_BODY]]
17 ; CHECK: Label [[#FOR_BODY137_LR_PH]]
18
19 source_filename = "reproducer.cl"
20 target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
21 target triple = "spir64-unknown-unknown"
22
23 define spir_kernel void @test(i8 addrspace(1)* %arg) local_unnamed_addr #0 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 {
24 entry:
25 br label %for.body
26
27 for.body137.lr.ph: ; preds = %for.body
28 ret void
29
30 for.body: ; preds = %for.body, %entry
31 br i1 undef, label %for.body, label %for.body137.lr.ph
32 }
33
34 attributes #0 = { "use-soft-float"="false" }
35 attributes #1 = { nounwind readnone speculatable }
36
37 !llvm.ident = !{!0}
38
39 !0 = !{!"clang version 9.0.0 "}
40 !1 = !{i32 1}
41 !2 = !{!"none"}
42 !3 = !{!"uchar*"}
43 !4 = !{!""}