diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-27 02:19:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-27 02:19:27 +0000 |
commit | cbb4b574c048325155f0138883e6fdff7363a256 (patch) | |
tree | f57c9a93bdd0894f9a5b46391eb7f86d310fa472 /test/Transforms/DeadStoreElimination | |
parent | db5b80a7f2521a1f9ca8f339fdac2b6e11cc422a (diff) | |
download | external_llvm-cbb4b574c048325155f0138883e6fdff7363a256.zip external_llvm-cbb4b574c048325155f0138883e6fdff7363a256.tar.gz external_llvm-cbb4b574c048325155f0138883e6fdff7363a256.tar.bz2 |
New testcase. DSE should delete all of the DEAD instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/DeadStoreElimination')
-rw-r--r-- | test/Transforms/DeadStoreElimination/context-sensitive.llx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/DeadStoreElimination/context-sensitive.llx b/test/Transforms/DeadStoreElimination/context-sensitive.llx new file mode 100644 index 0000000..428030c --- /dev/null +++ b/test/Transforms/DeadStoreElimination/context-sensitive.llx @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD + +declare void %ext() + +int* %caller() { + %P = malloc int + %DEAD = load int* %P + %DEAD2 = add int %DEAD, 1 + store int %DEAD2, int* %P ;; dead store + + call void %ext() ; Can not clobber *P + + store int 0, int* %P + ret int* %P +} |