xref: /llvm-project/llvm/test/tools/llvm-reduce/uselistorder-invalid-ir-output.ll (revision 11ad5401187761e7b4a4315b38125188037b60e8)
1; RUN: llvm-reduce -j=1 --abort-on-invalid-reduction \
2; RUN:   --delta-passes=operands-zero \
3; RUN:   -o %t.reduced.ll %s \
4; RUN:   --test=%python --test-arg %p/Inputs/llvm-as-and-filecheck.py \
5; RUN:   --test-arg llvm-as \
6; RUN:   --test-arg FileCheck --test-arg --check-prefix=INTERESTING \
7; RUN:   --test-arg %s
8
9; Check if the final output really parses
10; RUN: not llvm-as -o /dev/null %t.reduced.ll
11; RUN: FileCheck --check-prefix=RESULT %s < %t.reduced.ll
12
13
14define void @kernel_ocl_path_trace_direct_lighting(i1 %cond.i, i1 %cmp5.i.i, i32 %arg) {
15; INTERESTING: entry:
16; INTERESTING: 0
17; INTERESTING: 0
18; INTERESTING: %cmp5.i.i2 = icmp slt i32 {{[0-9]+}}, 0
19entry:
20  %add_zero_a = add i32 %arg, 0
21  %load1.i1 = load i32, ptr addrspace(1) null, align 4
22  %add_zero_b = add i32 %arg, 0
23  %cmp5.i.i2 = icmp slt i32 1, 0
24  br i1 %cond.i, label %if.end13.i.i, label %if.then6.i.i
25
26; INTERESTING: if.then6.i.i:
27; INTERESTING: %cond.i4 = icmp eq i32 %load0.i, 0
28if.then6.i.i:
29  %load0.i = load i32, ptr addrspace(4) null, align 4
30  %cond.i4 = icmp eq i32 %load0.i, 0
31  %extractVec358.i.i = insertelement <4 x float> zeroinitializer, float 1.000000e+00, i64 0
32  br i1 %cmp5.i.i, label %if.end13.i.i, label %kernel_direct_lighting.exit
33
34if.end13.i.i:
35  br i1 false, label %if.then263.i.i, label %if.end273.i.i
36
37; INTERESTING: if.then263.i.i:
38; INTERESTING-NEXT: i32 0
39if.then263.i.i:
40  %extractVec72.i.i.i11 = shufflevector <3 x float> zeroinitializer, <3 x float> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 poison>
41  br i1 %cond.i, label %if.end273.i.i, label %kernel_direct_lighting.exit
42
43; INTERESTING: if.end273.i.i:
44if.end273.i.i:
45  br label %kernel_direct_lighting.exit
46
47kernel_direct_lighting.exit:
48  ret void
49}
50
51; RESULT: uselistorder i32 0, { 4, 0, 5, 1, 6, 2, 7, 3 }
52