diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-30 22:18:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-30 22:18:47 +0000 |
commit | 7f430a50492e8ff617975126ca615107b6ae5321 (patch) | |
tree | 114c7699bd58dd03baa715767a68a4264ba5db51 /test | |
parent | bc1daaa8bb13f2cce6801f49928697fcde095a2e (diff) | |
download | external_llvm-7f430a50492e8ff617975126ca615107b6ae5321.zip external_llvm-7f430a50492e8ff617975126ca615107b6ae5321.tar.gz external_llvm-7f430a50492e8ff617975126ca615107b6ae5321.tar.bz2 |
New testcase for better mod/ref information that basicaa can provide
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx | 12 | ||||
-rw-r--r-- | test/Transforms/BasicAA/2004-01-29-InvariantMemory.llx | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx b/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx new file mode 100644 index 0000000..cfc4c48 --- /dev/null +++ b/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx @@ -0,0 +1,12 @@ +; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | not grep load + +%X = constant [2 x int] [int 4, int 5] + +int %test(int* %Y, long %idx) { + %P = getelementptr [2 x int]* %X, long 0, long %idx + %A = load int* %P ; Load from invariant memory + store int 4, int* %Y ; Store could not be to %X + %B = load int* %P + %C = sub int %A, %B + ret int %C +} diff --git a/test/Transforms/BasicAA/2004-01-29-InvariantMemory.llx b/test/Transforms/BasicAA/2004-01-29-InvariantMemory.llx new file mode 100644 index 0000000..cfc4c48 --- /dev/null +++ b/test/Transforms/BasicAA/2004-01-29-InvariantMemory.llx @@ -0,0 +1,12 @@ +; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | not grep load + +%X = constant [2 x int] [int 4, int 5] + +int %test(int* %Y, long %idx) { + %P = getelementptr [2 x int]* %X, long 0, long %idx + %A = load int* %P ; Load from invariant memory + store int 4, int* %Y ; Store could not be to %X + %B = load int* %P + %C = sub int %A, %B + ret int %C +} |