aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/store.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-02 02:06:37 +0000
committerChris Lattner <sabre@nondot.org>2009-11-02 02:06:37 +0000
commit7ebbabf5000cad682fcc2e4f58f2f83e1d38ef54 (patch)
tree958065da5a94d09c7bf190cca72d681100e09195 /test/Transforms/InstCombine/store.ll
parentf013eea9727d64c87a73944ce2099c648cb6de6c (diff)
downloadexternal_llvm-7ebbabf5000cad682fcc2e4f58f2f83e1d38ef54.zip
external_llvm-7ebbabf5000cad682fcc2e4f58f2f83e1d38ef54.tar.gz
external_llvm-7ebbabf5000cad682fcc2e4f58f2f83e1d38ef54.tar.bz2
fix instcombine to only do store sinking when the alignments
of the two loads agree. Propagate that onto the new store. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85772 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/store.ll')
-rw-r--r--test/Transforms/InstCombine/store.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/store.ll b/test/Transforms/InstCombine/store.ll
index 54f1621..314441e 100644
--- a/test/Transforms/InstCombine/store.ll
+++ b/test/Transforms/InstCombine/store.ll
@@ -64,3 +64,21 @@ Cont:
; CHECK-NEXT: ret i32 %storemerge
}
+; "if then"
+define void @test5(i1 %C, i32* %P) {
+ store i32 47, i32* %P, align 1
+ br i1 %C, label %Cond, label %Cont
+
+Cond:
+ store i32 -987654321, i32* %P, align 1
+ br label %Cont
+
+Cont:
+ ret void
+; CHECK: @test5
+; CHECK: Cont:
+; CHECK-NEXT: %storemerge = phi i32
+; CHECK-NEXT: store i32 %storemerge, i32* %P, align 1
+; CHECK-NEXT: ret void
+}
+