2 ; RUN: opt -print-predicateinfo -analyze -debug < %s 2>&1 | FileCheck %s
6 ; Make sure we are visiting the values to build predicate infos for in a
8 define i32 @test12(i32 %x, i32 %y) {
9 ; CHECK: Visiting i32 %x
10 ; CHECK: Visiting i32 %y
11 ; CHECK: Visiting %lcmp = icmp eq i32 %x, 0
12 ; CHECK: Visiting %lcmp2 = icmp slt i32 %y, 1000
13 ; CHECK: Visiting %lcmp3 = icmp slt i32 %y.0, 900
14 ; CHECK: Visiting %lcmp4 = icmp slt i32 %y.0.1, 700
15 ; CHECK: Visiting %lcmp5 = icmp slt i32 %y.0.1.2, 700
16 ; CHECK: Visiting %lcmp6 = icmp slt i32 %y.0.1.2.3, 700
17 ; CHECK: Visiting %lcmp7 = icmp slt i32 %y.0.1.2.3.4, 700
18 ; CHECK: Visiting %rcmp = icmp eq i32 %x, 0
20 br i1 undef, label %left, label %right
23 %lcmp = icmp eq i32 %x, 0
24 br i1 %lcmp, label %left_cond_true, label %left_cond_false
27 %lcmp2 = icmp slt i32 %y, 1000
28 br i1 %lcmp2, label %left_cond_true2, label %left_ret
31 call void @use(i32 %y)
32 %lcmp3 = icmp slt i32 %y, 900
33 br i1 %lcmp3, label %left_cond_true3, label %left_ret
36 call void @use(i32 %y)
37 %lcmp4 = icmp slt i32 %y, 700
38 br i1 %lcmp4, label %left_cond_true4, label %left_ret
41 call void @use(i32 %y)
42 %lcmp5 = icmp slt i32 %y, 700
43 br i1 %lcmp5, label %left_cond_true5, label %left_ret
46 call void @use(i32 %y)
47 %lcmp6 = icmp slt i32 %y, 700
48 br i1 %lcmp6, label %left_cond_true6, label %left_ret
51 call void @use(i32 %y)
52 %lcmp7 = icmp slt i32 %y, 700
53 br i1 %lcmp7, label %left_cond_true7, label %left_ret
62 %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 ]
67 %rcmp = icmp eq i32 %x, 0
68 br i1 %rcmp, label %right_cond_true, label %right_cond_false
77 %rres = phi i32 [ %x, %right_cond_true ], [ %x, %right_cond_false ]