1; REQUIRES: assert-but-this-is-misspelled-and-should-say-asserts-but-then-the-test-case-will-fail 2; RUN: opt -passes=print-predicateinfo -debug < %s 2>&1 | FileCheck %s 3 4declare void @use(i32) 5 6; Make sure we are visiting the values to build predicate infos for in a 7; deterministic order. 8define 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 19entry: 20 br i1 undef, label %left, label %right 21 22left: 23 %lcmp = icmp eq i32 %x, 0 24 br i1 %lcmp, label %left_cond_true, label %left_cond_false 25 26left_cond_true: 27 %lcmp2 = icmp slt i32 %y, 1000 28 br i1 %lcmp2, label %left_cond_true2, label %left_ret 29 30left_cond_true2: 31 call void @use(i32 %y) 32 %lcmp3 = icmp slt i32 %y, 900 33 br i1 %lcmp3, label %left_cond_true3, label %left_ret 34 35left_cond_true3: 36 call void @use(i32 %y) 37 %lcmp4 = icmp slt i32 %y, 700 38 br i1 %lcmp4, label %left_cond_true4, label %left_ret 39 40left_cond_true4: 41 call void @use(i32 %y) 42 %lcmp5 = icmp slt i32 %y, 700 43 br i1 %lcmp5, label %left_cond_true5, label %left_ret 44 45left_cond_true5: 46 call void @use(i32 %y) 47 %lcmp6 = icmp slt i32 %y, 700 48 br i1 %lcmp6, label %left_cond_true6, label %left_ret 49 50left_cond_true6: 51 call void @use(i32 %y) 52 %lcmp7 = icmp slt i32 %y, 700 53 br i1 %lcmp7, label %left_cond_true7, label %left_ret 54 55left_cond_true7: 56 ret i32 %y 57 58left_cond_false: 59 br label %left_ret 60 61left_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 ] 63 64 ret i32 %lres 65 66right: 67 %rcmp = icmp eq i32 %x, 0 68 br i1 %rcmp, label %right_cond_true, label %right_cond_false 69 70right_cond_true: 71 br label %right_ret 72 73right_cond_false: 74 br label %right_ret 75 76right_ret: 77 %rres = phi i32 [ %x, %right_cond_true ], [ %x, %right_cond_false ] 78 ret i32 %rres 79} 80