2 ; RUN: opt < %s -loop-reduce -S | FileCheck %s
6 declare i8* @bar(i8*,i8*,i8*,i8*)
8 define void @f(i64* %a,i64* %b,i64* %c,i64* %d,i64* %e,i64* %f,i64* %g) nounwind uwtable {
10 br label %b_throw.preheader
12 D_BREAK_LBL: ; preds = %indirectgoto
14 br label %indirectgoto
16 H_CONST_LBL: ; preds = %indirectgoto
20 H_MPZ_LBL: ; preds = %indirectgoto
21 %boo3 = call i1 @foo()
22 br i1 %boo3, label %body_failed, label %while.cond.i
24 while.cond.i: ; preds = %while.body.i15795, %if.then.i15791
25 %phi = phi i64 [ %tmp20916, %while.body.i15795 ], [ 0, %H_MPZ_LBL ]
26 %tmp20916 = add i64 %phi, 1
27 %incdec.ptr.i15793 = getelementptr i64, i64* %pc.0.lcssa.i1610719352, i64 %tmp20916
28 %boo2 = call i1 @foo()
29 br i1 %boo2, label %indirectgoto, label %while.body.i15795
31 while.body.i15795: ; preds = %while.cond.i
32 %tmp20.i = load i64, i64* %incdec.ptr.i15793, align 8
33 %boo1 = call i1 @foo()
34 br i1 %boo1, label %while.cond.i, label %body_failed
36 b_throw.preheader: ; preds = %body_failed, %entry
38 br label %indirectgoto
41 %pc.0.lcssa.i1610719364 = phi i64* [ %pc.0.lcssa.i1610719352, %indirectgoto ], [ %pc.0.lcssa.i1610719352, %H_MPZ_LBL ], [ %b, %H_CONST_LBL ], [ %pc.0.lcssa.i1610719352, %while.body.i15795 ]
43 br label %b_throw.preheader
46 %pc.0.lcssa.i1610719352 = phi i64* [ %pc.0.lcssa.i1610719352, %D_BREAK_LBL ], [ %a, %b_throw.preheader ], [ %d, %while.cond.i ]
47 %p = call i8* @bar(i8* blockaddress(@f, %D_BREAK_LBL), i8* blockaddress(@f, %H_CONST_LBL), i8* blockaddress(@f, %H_MPZ_LBL), i8* blockaddress(@f, %body_failed) )
48 indirectbr i8* %p, [label %D_BREAK_LBL, label %H_CONST_LBL, label %H_MPZ_LBL, label %body_failed]
51 ; CHECK: %p = call i8* @bar(i8* blockaddress(@f, %D_BREAK_LBL), i8* blockaddress(@f, %H_CONST_LBL), i8* blockaddress(@f, %H_MPZ_LBL), i8* blockaddress(@f, %body_failed))
52 ; CHECK: indirectbr i8* %p, [label %D_BREAK_LBL, label %H_CONST_LBL, label %H_MPZ_LBL, label %body_failed]