1 ; This testcase checks to make sure we can sink values which are only live on
2 ; some exits out of the loop, and that we can do so without breaking dominator
5 ; RUN: llvm-as < %s | opt -licm | llvm-dis | \
6 ; RUN: %prcontext add 1 | grep exit2:
8 define i32 @test(i1 %C1, i1 %C2, i32* %P, i32* %Q) {
11 Loop: ; preds = %Cont, %Entry
12 br i1 %C1, label %Cont, label %exit1
14 %X = load i32* %P ; <i32> [#uses=2]
16 %V = add i32 %X, 1 ; <i32> [#uses=1]
17 br i1 %C2, label %Loop, label %exit2
18 exit1: ; preds = %Loop
20 exit2: ; preds = %Cont