1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
3 define void @t() nounwind ssp {
6 br i1 undef, label %return, label %if.end.i
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
12 if.end: ; preds = %if.end.i
14 ; CHECK: movl (%{{.*}}), [[REG:%[a-z]+]]
15 ; CHECK-NOT: movl [[REG]], [[REG]]
16 ; CHECK-NEXT: testl [[REG]], [[REG]]
18 %tmp138 = select i1 undef, i32 0, i32 %tmp7.i
19 %tmp867 = zext i32 %tmp138 to i64
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
28 land.rhs: ; preds = %while.cond
29 br i1 undef, label %while.body, label %while.end
31 while.body: ; preds = %land.rhs
34 while.end: ; preds = %land.rhs, %while.cond
35 br i1 undef, label %cond.false205, label %cond.true190
37 cond.true190: ; preds = %while.end
38 br i1 undef, label %cond.false242, label %cond.true225
40 cond.false205: ; preds = %while.end
43 cond.true225: ; preds = %cond.true190
44 br i1 undef, label %cond.false280, label %cond.true271
46 cond.false242: ; preds = %cond.true190
49 cond.true271: ; preds = %cond.true225
52 cond.false280: ; preds = %cond.true225
55 return: ; preds = %if.end.i, %entry
59 !0 = metadata !{metadata !"int", metadata !1}
60 !1 = metadata !{metadata !"omnipotent char", metadata !2}
61 !2 = metadata !{metadata !"Simple C/C++ TBAA", null}