In some rare cases, the register allocator can spill registers but end up not utilizi...
[llvm/msp430.git] / test / Transforms / LICM / sink_critical_edge.ll
blob6998ab1580c3552b3ef910888e5fe1293c2973fa
1 ; This testcase checks to make sure the sinker does not cause problems with
2 ; critical edges.
4 ; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext add 1 | grep Exit
6 define void @test() {
7 Entry:
8         br i1 false, label %Loop, label %Exit
9 Loop:           ; preds = %Loop, %Entry
10         %X = add i32 0, 1               ; <i32> [#uses=1]
11         br i1 false, label %Loop, label %Exit
12 Exit:           ; preds = %Loop, %Entry
13         %Y = phi i32 [ 0, %Entry ], [ %X, %Loop ]               ; <i32> [#uses=0]
14         ret void