diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-15 01:00:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-15 01:00:37 +0000 |
commit | efcb4f6ed4da38bb58cb98f188896da0540030fc (patch) | |
tree | 681cf1de8213f74c533f138b5a13e08d52cb94dc | |
parent | 20746d84c273703d24aa2b709faf7614fd8c3f6c (diff) | |
download | bcm5719-llvm-efcb4f6ed4da38bb58cb98f188896da0540030fc.tar.gz bcm5719-llvm-efcb4f6ed4da38bb58cb98f188896da0540030fc.zip |
new testcase
llvm-svn: 36039
-rw-r--r-- | llvm/test/Transforms/InstCombine/store-merge.ll | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/store-merge.ll b/llvm/test/Transforms/InstCombine/store-merge.ll new file mode 100644 index 00000000000..c457a2f9c9a --- /dev/null +++ b/llvm/test/Transforms/InstCombine/store-merge.ll @@ -0,0 +1,36 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i32 %storemerge} | wc -l | grep 2 +;; Simple sinking tests + +; "if then else" +define i32 @test1(i1 %C) { + %A = alloca i32 + br i1 %C, label %Cond, label %Cond2 + +Cond: + store i32 -987654321, i32* %A + br label %Cont + +Cond2: + store i32 47, i32* %A + br label %Cont + +Cont: + %V = load i32* %A + ret i32 %V +} + +; "if then" +define i32 @test2(i1 %C) { + %A = alloca i32 + store i32 47, i32* %A + br i1 %C, label %Cond, label %Cont + +Cond: + store i32 -987654321, i32* %A + br label %Cont + +Cont: + %V = load i32* %A + ret i32 %V +} + |