1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt -print-predicateinfo < %s 2>&1 | FileCheck %s 3; Don't insert predicate info for conditions with a single target. 4@a = global i32 6, align 4 5@c = global i32 -1, align 4 6@e = common global i32 0, align 4 7@.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 8@d = common global i32 0, align 4 9@b = common global [6 x i32] zeroinitializer, align 16 10 11; Function Attrs: nounwind ssp uwtable 12define i32 @main() { 13; CHECK-LABEL: @main( 14; CHECK-NEXT: store i32 6, i32* @e, align 4 15; CHECK-NEXT: br label [[TMP1:%.*]] 16; CHECK: [[TMP2:%.*]] = load i32, i32* @d, align 4 17; CHECK-NEXT: [[TMP3:%.*]] = sext i32 [[TMP2]] to i64 18; CHECK-NEXT: [[TMP4:%.*]] = getelementptr inbounds [6 x i32], [6 x i32]* @b, i64 0, i64 [[TMP3]] 19; CHECK-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4 20; CHECK-NEXT: [[TMP6:%.*]] = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 [[TMP5]]) 21; CHECK-NEXT: [[TMP7:%.*]] = load i32, i32* @a, align 4 22; CHECK-NEXT: [[TMP8:%.*]] = icmp eq i32 [[TMP7]], 0 23; CHECK-NEXT: br i1 [[TMP8]], label %thread-pre-split, label [[TMP9:%.*]] 24; CHECK: [[TMP10:%.*]] = load i32, i32* @e, align 4 25; CHECK-NEXT: [[TMP11:%.*]] = icmp eq i32 [[TMP10]], 0 26; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP12]] 27; CHECK: thread-pre-split: 28; CHECK-NEXT: [[DOTPR:%.*]] = load i32, i32* @e, align 4 29; CHECK-NEXT: br label [[TMP12]] 30; CHECK: [[TMP13:%.*]] = phi i32 [ [[DOTPR]], %thread-pre-split ], [ [[TMP10]], [[TMP9]] ], [ [[TMP10]], [[TMP9]] ] 31; CHECK-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0 32; CHECK-NEXT: br i1 [[TMP14]], label [[TMP15:%.*]], label [[TMP15]] 33; CHECK: br i1 [[TMP14]], label [[TMP16:%.*]], label [[TMP17:%.*]] 34; CHECK: br label [[TMP17]] 35; CHECK: [[DOT0:%.*]] = phi i32 [ 1, [[TMP16]] ], [ -1, [[TMP15]] ] 36; CHECK-NEXT: [[TMP18:%.*]] = and i32 [[DOT0]], 8693 37; CHECK-NEXT: [[TMP19:%.*]] = load i32, i32* @c, align 4 38; CHECK-NEXT: [[TMP20:%.*]] = xor i32 [[TMP18]], [[TMP19]] 39; CHECK-NEXT: [[TMP21:%.*]] = xor i32 [[TMP20]], -1 40; CHECK-NEXT: store i32 [[TMP21]], i32* @d, align 4 41; CHECK-NEXT: [[TMP22:%.*]] = icmp slt i32 [[TMP20]], -2 42; CHECK-NEXT: br i1 [[TMP22]], label [[TMP1]], label [[TMP23:%.*]] 43; CHECK: ret i32 0 44; 45 store i32 6, i32* @e, align 4 46 br label %1 47 48; <label>:1: ; preds = %17, %0 49 %2 = load i32, i32* @d, align 4 50 %3 = sext i32 %2 to i64 51 %4 = getelementptr inbounds [6 x i32], [6 x i32]* @b, i64 0, i64 %3 52 %5 = load i32, i32* %4, align 4 53 %6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5) #2 54 %7 = load i32, i32* @a, align 4 55 %8 = icmp eq i32 %7, 0 56 br i1 %8, label %thread-pre-split, label %9 57 58; <label>:9: ; preds = %1 59 %10 = load i32, i32* @e, align 4 60 %11 = icmp eq i32 %10, 0 61 br i1 %11, label %12, label %12 62 63thread-pre-split: ; preds = %1 64 %.pr = load i32, i32* @e, align 4 65 br label %12 66 67; <label>:12: ; preds = %thread-pre-split, %9, %9 68 %13 = phi i32 [ %.pr, %thread-pre-split ], [ %10, %9 ], [ %10, %9 ] 69 %14 = icmp ne i32 %13, 0 70 br i1 %14, label %15, label %15 71 72; <label>:15: ; preds = %12, %12 73 br i1 %14, label %16, label %17 74 75; <label>:16: ; preds = %15 76 br label %17 77 78; <label>:17: ; preds = %16, %15 79 %.0 = phi i32 [ 1, %16 ], [ -1, %15 ] 80 %18 = and i32 %.0, 8693 81 %19 = load i32, i32* @c, align 4 82 %20 = xor i32 %18, %19 83 %21 = xor i32 %20, -1 84 store i32 %21, i32* @d, align 4 85 %22 = icmp slt i32 %20, -2 86 br i1 %22, label %1, label %23 87 88; <label>:23: ; preds = %17 89 ret i32 0 90} 91 92declare i32 @printf(i8*, ...) 93 94