aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-09-07 05:33:03 +0000
committerChris Lattner <sabre@nondot.org>2007-09-07 05:33:03 +0000
commit24905f7cfbf50deaa9dd7c94c5e02789b8afeaef (patch)
tree3e1293daa2e5389cf2326bf0f0d47cc983d40cd8 /test/Transforms/InstCombine
parent1636de94069d492185da2dd36859d4a1962a2eed (diff)
downloadexternal_llvm-24905f7cfbf50deaa9dd7c94c5e02789b8afeaef.zip
external_llvm-24905f7cfbf50deaa9dd7c94c5e02789b8afeaef.tar.gz
external_llvm-24905f7cfbf50deaa9dd7c94c5e02789b8afeaef.tar.bz2
Don't zap back to back volatile load/stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r--test/Transforms/InstCombine/volatile_store.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/volatile_store.ll b/test/Transforms/InstCombine/volatile_store.ll
new file mode 100644
index 0000000..09651ba
--- /dev/null
+++ b/test/Transforms/InstCombine/volatile_store.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {volatile store}
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {volatile load}
+
+@x = weak global i32 0 ; <i32*> [#uses=2]
+
+define void @self_assign_1() {
+entry:
+ %tmp = volatile load i32* @x ; <i32> [#uses=1]
+ volatile store i32 %tmp, i32* @x
+ br label %return
+
+return: ; preds = %entry
+ ret void
+}