2 ; RUN: opt -passes=print-predicateinfo -debug < %s 2>&1 | FileCheck %s
5 declare void @use.i1(i1)
7 ; Make sure we are visiting the values to build predicate infos for in a
9 define i32 @test12(i32 %x, i32 %y, i1 %c1) {
10 ; CHECK: Visiting %lcmp = icmp eq i32 %x, 0
11 ; CHECK: Visiting i32 %x
12 ; CHECK: Visiting %lcmp2 = icmp slt i32 %y, 1000
13 ; CHECK: Visiting i32 %y
14 ; CHECK: Visiting %lcmp3 = icmp slt i32 %y.0, 900
15 ; CHECK: Visiting %lcmp4 = icmp slt i32 %y.0.1, 700
16 ; CHECK: Visiting %lcmp5 = icmp slt i32 %y.0.1.2, 700
17 ; CHECK: Visiting %lcmp6 = icmp slt i32 %y.0.1.2.3, 700
18 ; CHECK: Visiting %lcmp7 = icmp slt i32 %y.0.1.2.3.4, 700
19 ; CHECK: Visiting %rcmp = icmp eq i32 %x, 0
21 br i1 %c1, label %left, label %right
24 %lcmp = icmp eq i32 %x, 0
25 br i1 %lcmp, label %left_cond_true, label %left_cond_false
28 %lcmp2 = icmp slt i32 %y, 1000
29 br i1 %lcmp2, label %left_cond_true2, label %left_ret
32 call void @use(i32 %y)
33 %lcmp3 = icmp slt i32 %y, 900
34 br i1 %lcmp3, label %left_cond_true3, label %left_ret
37 call void @use(i32 %y)
38 %lcmp4 = icmp slt i32 %y, 700
39 br i1 %lcmp4, label %left_cond_true4, label %left_ret
42 call void @use(i32 %y)
43 %lcmp5 = icmp slt i32 %y, 700
44 br i1 %lcmp5, label %left_cond_true5, label %left_ret
47 call void @use(i32 %y)
48 %lcmp6 = icmp slt i32 %y, 700
49 br i1 %lcmp6, label %left_cond_true6, label %left_ret
52 call void @use(i32 %y)
53 %lcmp7 = icmp slt i32 %y, 700
54 br i1 %lcmp7, label %left_cond_true7, label %left_ret
57 call void @use.i1(i1 %lcmp)
58 call void @use.i1(i1 %lcmp2)
59 call void @use.i1(i1 %lcmp3)
60 call void @use.i1(i1 %lcmp4)
61 call void @use.i1(i1 %lcmp5)
62 call void @use.i1(i1 %lcmp6)
63 call void @use.i1(i1 %lcmp7)
70 %lres = phi i32 [ %x, %left_cond_true ], [ %x, %left_cond_false ], [ %x, %left_cond_true2 ], [ %x, %left_cond_true3 ], [ %x, %left_cond_true4 ], [ %x, %left_cond_true5 ], [ %x, %left_cond_true6 ]
75 %rcmp = icmp eq i32 %x, 0
76 br i1 %rcmp, label %right_cond_true, label %right_cond_false
79 call void @use.i1(i1 %rcmp)
86 %rres = phi i32 [ %x, %right_cond_true ], [ %x, %right_cond_false ]