1; RUN: opt < %s -indvars -loop-deletion -S | grep phi | count 1 2 3define i32 @test(i32 %x_offs) nounwind readnone { 4entry: 5 %0 = icmp sgt i32 %x_offs, 4 ; <i1> [#uses=1] 6 br i1 %0, label %bb.nph, label %bb2 7 8bb.nph: ; preds = %entry 9 br label %bb 10 11bb: ; preds = %bb1, %bb.nph 12 %x_offs_addr.01 = phi i32 [ %1, %bb1 ], [ %x_offs, %bb.nph ] ; <i32> [#uses=1] 13 %1 = add i32 %x_offs_addr.01, -4 ; <i32> [#uses=3] 14 br label %bb1 15 16bb1: ; preds = %bb 17 %2 = icmp sgt i32 %1, 4 ; <i1> [#uses=1] 18 br i1 %2, label %bb, label %bb1.bb2_crit_edge 19 20bb1.bb2_crit_edge: ; preds = %bb1 21 br label %bb2 22 23bb2: ; preds = %bb1.bb2_crit_edge, %entry 24 %x_offs_addr.0.lcssa = phi i32 [ %1, %bb1.bb2_crit_edge ], [ %x_offs, %entry ] ; <i32> [#uses=1] 25 ret i32 %x_offs_addr.0.lcssa 26} 27