1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s 2 3 define void @t() nounwind ssp { 4 ; CHECK: t: 5 entry: 6 br i1 undef, label %return, label %if.end.i 7 8 if.end.i: ; preds = %entry 9 %tmp7.i = load i32* undef, align 4, !tbaa !0 10 br i1 undef, label %return, label %if.end 11 12 if.end: ; preds = %if.end.i 13 ; CHECK: %if.end 14 ; CHECK: movl (%{{.*}}), [[REG:%[a-z]+]] 15 ; CHECK-NOT: movl [[REG]], [[REG]] 16 ; CHECK-NEXT: testl [[REG]], [[REG]] 17 ; CHECK-NEXT: xorb 18 %tmp138 = select i1 undef, i32 0, i32 %tmp7.i 19 %tmp867 = zext i32 %tmp138 to i64 20 br label %while.cond 21 22 while.cond: ; preds = %while.body, %if.end 23 %tmp869 = sub i64 %tmp867, 0 24 %scale2.0 = trunc i64 %tmp869 to i32 25 %cmp149 = icmp eq i32 %scale2.0, 0 26 br i1 %cmp149, label %while.end, label %land.rhs 27 28 land.rhs: ; preds = %while.cond 29 br i1 undef, label %while.body, label %while.end 30 31 while.body: ; preds = %land.rhs 32 br label %while.cond 33 34 while.end: ; preds = %land.rhs, %while.cond 35 br i1 undef, label %cond.false205, label %cond.true190 36 37 cond.true190: ; preds = %while.end 38 br i1 undef, label %cond.false242, label %cond.true225 39 40 cond.false205: ; preds = %while.end 41 unreachable 42 43 cond.true225: ; preds = %cond.true190 44 br i1 undef, label %cond.false280, label %cond.true271 45 46 cond.false242: ; preds = %cond.true190 47 unreachable 48 49 cond.true271: ; preds = %cond.true225 50 unreachable 51 52 cond.false280: ; preds = %cond.true225 53 unreachable 54 55 return: ; preds = %if.end.i, %entry 56 ret void 57 } 58 59 !0 = metadata !{metadata !"int", metadata !1} 60 !1 = metadata !{metadata !"omnipotent char", metadata !2} 61 !2 = metadata !{metadata !"Simple C/C++ TBAA", null} 62