1; RUN: opt < %s -simplifycfg -disable-output 2; PR 2777 3@g_103 = common global i32 0 ; <i32*> [#uses=1] 4 5define i32 @func_127(i32 %p_129) nounwind { 6entry: 7 load i32, i32* @g_103, align 4 ; <i32>:0 [#uses=1] 8 icmp eq i32 %0, 0 ; <i1>:1 [#uses=2] 9 br i1 %1, label %bb6.preheader, label %entry.return_crit_edge 10 11entry.return_crit_edge: ; preds = %entry 12 br label %return 13 14bb6.preheader: ; preds = %entry 15 br i1 %1, label %bb6.preheader.split.us, label %bb6.preheader.split 16 17bb6.preheader.split.us: ; preds = %bb6.preheader 18 br label %return.loopexit.split 19 20bb6.preheader.split: ; preds = %bb6.preheader 21 br label %bb6 22 23bb6: ; preds = %bb17.bb6_crit_edge, %bb6.preheader.split 24 %indvar35 = phi i32 [ 0, %bb6.preheader.split ], [ %indvar.next36, %bb17.bb6_crit_edge ] ; <i32> [#uses=1] 25 %p_129_addr.3.reg2mem.0 = phi i32 [ %p_129_addr.2, %bb17.bb6_crit_edge ], [ %p_129, %bb6.preheader.split ] ; <i32> [#uses=3] 26 icmp eq i32 %p_129_addr.3.reg2mem.0, 0 ; <i1>:2 [#uses=1] 27 br i1 %2, label %bb6.bb17_crit_edge, label %bb8 28 29bb6.bb17_crit_edge: ; preds = %bb6 30 br label %bb17 31 32bb8: ; preds = %bb6 33 br label %bb13 34 35bb13: ; preds = %bb8 36 br label %bb17 37 38bb17: ; preds = %bb13, %bb6.bb17_crit_edge 39 %p_129_addr.2 = phi i32 [ %p_129_addr.3.reg2mem.0, %bb13 ], [ %p_129_addr.3.reg2mem.0, %bb6.bb17_crit_edge ] ; <i32> [#uses=1] 40 %indvar.next36 = add i32 %indvar35, 1 ; <i32> [#uses=2] 41 %exitcond37 = icmp eq i32 %indvar.next36, -1 ; <i1> [#uses=1] 42 br i1 %exitcond37, label %return.loopexit, label %bb17.bb6_crit_edge 43 44bb17.bb6_crit_edge: ; preds = %bb17 45 br label %bb6 46 47return.loopexit: ; preds = %bb17 48 br label %return.loopexit.split 49 50return.loopexit.split: ; preds = %return.loopexit, %bb6.preheader.split.us 51 br label %return 52 53return: ; preds = %return.loopexit.split, %entry.return_crit_edge 54 ret i32 1 55} 56 57define i32 @func_135(i8 zeroext %p_137, i32 %p_138, i32 %p_140) nounwind { 58entry: 59 ret i32 undef 60} 61