summaryrefslogtreecommitdiffstats
path: root/test/Transforms/GCSE
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-16 12:05:38 +0000
committerChris Lattner <sabre@nondot.org>2003-06-16 12:05:38 +0000
commitf27aca9276a855a99122df37205830e4ad16e5ab (patch)
tree7f201857cc62dd3141adf6153a9bd3c4f89e002f /test/Transforms/GCSE
parent84c9d5c3c08ac602d53dcef4f7d6298e23a3ccb7 (diff)
downloadexternal_llvm-f27aca9276a855a99122df37205830e4ad16e5ab.zip
external_llvm-f27aca9276a855a99122df37205830e4ad16e5ab.tar.gz
external_llvm-f27aca9276a855a99122df37205830e4ad16e5ab.tar.bz2
New testcases for bugs and the new DAE pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/GCSE')
-rw-r--r--test/Transforms/GCSE/2003-06-13-LoadStoreEliminate.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/GCSE/2003-06-13-LoadStoreEliminate.ll b/test/Transforms/GCSE/2003-06-13-LoadStoreEliminate.ll
new file mode 100644
index 0000000..77a087a
--- /dev/null
+++ b/test/Transforms/GCSE/2003-06-13-LoadStoreEliminate.ll
@@ -0,0 +1,14 @@
+; This testcase shows a bug where an common subexpression exists, but there
+; is no shared dominator block that the expression can be hoisted out to.
+;
+; RUN: if as < %s | opt -load-vn -gcse | dis | grep load
+; RUN: then exit 1
+; RUN: else exit 0
+; RUN: fi
+
+int %test(int* %P) {
+ store int 5, int* %P
+ %Z = load int* %P
+ ret int %Z
+}
+