Test that prune-eh doesn't make deductions based
[oota-llvm.git] / test / Transforms / GCSE / 2002-05-21-NoSharedDominator.ll
1 ; This testcase shows a bug where an common subexpression exists, but there
2 ; is no shared dominator block that the expression can be hoisted out to.
3 ;
4 ; RUN: llvm-as < %s | opt -gcse | llvm-dis
5
6 define i32 @test(i32 %X, i32 %Y) {
7         %Z = add i32 %X, %Y             ; <i32> [#uses=1]
8         ret i32 %Z
9
10 Unreachable:            ; No predecessors!
11         %Q = add i32 %X, %Y             ; <i32> [#uses=1]
12         ret i32 %Q
13 }
14