78 lines · plain
1; RUN: opt -passes=loop-unroll -S < %s | FileCheck %s2target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"3target triple = "i686-pc-windows-msvc"4 5declare void @fn1(ptr)6 7declare i1 @fn2(ptr, ptr)8 9define void @fn4(i1 %arg) personality ptr @__CxxFrameHandler3 {10entry:11 br label %for.body12 13for.body: ; preds = %for.inc, %entry14 %i.05 = phi i8 [ 0, %entry ], [ %inc, %for.inc ]15 store i8 undef, ptr undef, align 416 invoke void @fn1(ptr undef)17 to label %call.i.noexc unwind label %ehcleanup18 19call.i.noexc: ; preds = %for.body20 %call1.i2 = invoke i1 @fn2(ptr undef, ptr undef)21 to label %call1.i.noexc unwind label %ehcleanup22 23call1.i.noexc: ; preds = %call.i.noexc24 br i1 %arg, label %if.then.i, label %if.end4.i25 26if.then.i: ; preds = %call1.i.noexc27 %tmp1 = load i8, ptr undef, align 428 %tobool.i = icmp eq i8 undef, undef29 br i1 %arg, label %if.end4.i, label %if.then2.i30 31if.then2.i: ; preds = %if.then.i32 %call3.i3 = invoke i1 @fn2(ptr undef, ptr null)33 to label %call3.i.noexc unwind label %ehcleanup34 35call3.i.noexc: ; preds = %if.then2.i36 br label %if.end4.i37 38if.end4.i: ; preds = %call3.i.noexc, %if.then.i, %call1.i.noexc39 %tmp2 = load i8, ptr undef, align 440 br label %if.then6.i41 42if.then6.i: ; preds = %if.end4.i43 %call7.i4 = invoke i1 @fn2(ptr undef, ptr null)44 to label %call7.i.noexc unwind label %ehcleanup45 46call7.i.noexc: ; preds = %if.then6.i47 br label %fn348 49fn3: ; preds = %call7.i.noexc50 %tmp3 = load i8, ptr undef, align 451 %inc.i = add nsw i8 undef, undef52 store i8 undef, ptr undef, align 453 br label %for.inc54 55for.inc: ; preds = %fn356 %inc = add nsw i8 %i.05, 157 %cmp = icmp slt i8 %inc, 658 br i1 %cmp, label %for.body, label %for.end59 60for.end: ; preds = %for.inc61 invoke void @throw()62 to label %unreachable unwind label %ehcleanup63 64ehcleanup: ; preds = %for.end, %if.then6.i, %if.then2.i, %call.i.noexc, %for.body65 %cp = cleanuppad within none []66 cleanupret from %cp unwind to caller67 68; CHECK: cleanuppad69; CHECK-NOT: cleanuppad70 71unreachable: ; preds = %for.end72 unreachable73}74 75declare i32 @__CxxFrameHandler3(...)76 77declare void @throw()78