br label %for.body.lr.ph
for.body.lr.ph: ; preds = %entry
+; CHECK-LABEL: for.body.lr.ph:
+; CHECK-NEXT: %addr.promoted = load i32, i32* %addr, align 1
br label %for.header
for.header:
br label %for.body.lr.ph
for.body.lr.ph: ; preds = %entry
+; CHECK-LABEL: for.body.lr.ph:
+; CHECK-NEXT: %addr.promoted = load i32, i32* %addr, align 1
br label %for.header
for.header:
ret void
}
+define void @test3(i1 zeroext %y) uwtable {
+; CHECK-LABEL: @test3
+entry:
+; CHECK-LABEL: entry:
+; CHECK-NEXT: %a = alloca i32
+; CHECK-NEXT: %a.promoted = load i32, i32* %a, align 1
+ %a = alloca i32
+ br label %for.body
+
+for.body:
+ %i.03 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
+ %0 = load i32, i32* %a, align 4
+ %add = add nsw i32 %0, 1
+ tail call void @f()
+ store i32 %add, i32* %a, align 4
+ %inc = add nuw nsw i32 %i.03, 1
+ %exitcond = icmp eq i32 %inc, 10000
+ br i1 %exitcond, label %for.cond.cleanup, label %for.body
+
+for.cond.cleanup:
+; CHECK-LABEL: for.cond.cleanup:
+; CHECK: store i32 %add.lcssa, i32* %a, align 1
+; CHECK-NEXT: ret void
+ ret void
+}
+
@_ZTIi = external constant i8*
; In this test, the loop is within a try block. There is an explicit unwind edge out of the loop.