1; This test shows SCCP "proving" that the loop (from bb6 to 14) loops infinitely 2; this is in fact NOT the case, so the return should still be alive in the code 3; after sccp and CFG simplification have been performed. 4; 5; RUN: opt < %s -sccp -simplifycfg -S | \ 6; RUN: grep ret 7 8define void @old_main() { 9bb3: 10 br label %bb6 11bb6: ; preds = %bb14, %bb3 12 %reg403 = phi i32 [ %reg155, %bb14 ], [ 0, %bb3 ] ; <i32> [#uses=1] 13 %reg155 = add i32 %reg403, 1 ; <i32> [#uses=2] 14 br label %bb11 15bb11: ; preds = %bb11, %bb6 16 %reg407 = phi i32 [ %reg408, %bb11 ], [ 0, %bb6 ] ; <i32> [#uses=2] 17 %reg408 = add i32 %reg407, 1 ; <i32> [#uses=1] 18 %cond550 = icmp sle i32 %reg407, 1 ; <i1> [#uses=1] 19 br i1 %cond550, label %bb11, label %bb12 20bb12: ; preds = %bb11 21 br label %bb13 22bb13: ; preds = %bb13, %bb12 23 %reg409 = phi i32 [ %reg410, %bb13 ], [ 0, %bb12 ] ; <i32> [#uses=1] 24 %reg410 = add i32 %reg409, 1 ; <i32> [#uses=2] 25 %cond552 = icmp sle i32 %reg410, 2 ; <i1> [#uses=1] 26 br i1 %cond552, label %bb13, label %bb14 27bb14: ; preds = %bb13 28 %cond553 = icmp sle i32 %reg155, 31 ; <i1> [#uses=1] 29 br i1 %cond553, label %bb6, label %bb15 30bb15: ; preds = %bb14 31 ret void 32} 33 34