2 ; RUN: opt < %s -passes='simple-loop-unswitch<nontrivial>' -disable-output
3 ; RUN: opt < %s -simple-loop-unswitch -enable-nontrivial-unswitch -disable-output
6 ; Make sure we don't crash due to a dangling use of %tmp2 in bb7.
7 define void @test.use_in_dead_block(i1 %arg1, i1 %arg2) {
11 bb2: ; preds = %bb4, %bb1
12 %tmp1 = phi i64 [ 0, %bb4 ], [ 42, %bb1 ]
13 br i1 %arg1, label %bb3, label %bb6
16 br i1 %arg2, label %bb5, label %bb4
26 %tmp3 = add i64 %tmp1, 1
29 bb7: ; No predecessors!
30 %tmp4 = add i32 %tmp2, 1