Prune the unwind_to labels on BBs that don't need them. Another step in the
[oota-llvm.git] / test / Transforms / PruneEH / unwindto.ll
1 ; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep unwind_to
2
3 define i8 @test7(i1 %b) {
4 entry: unwind_to %cleanup
5   br i1 %b, label %cond_true, label %cond_false
6 cond_true: unwind_to %cleanup
7   br label %cleanup
8 cond_false: unwind_to %cleanup
9   br label %cleanup
10 cleanup:
11   %x = phi i8 [0, %entry], [1, %cond_true], [1, %cond_true],
12                            [2, %cond_false], [2, %cond_false]
13   ret i8 %x
14 }
15