mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
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
This commit is contained in:
parent
bc1daaa8bb
commit
7f430a5049
12
test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx
Normal file
12
test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx
Normal file
@ -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
|
||||
}
|
12
test/Transforms/BasicAA/2004-01-29-InvariantMemory.llx
Normal file
12
test/Transforms/BasicAA/2004-01-29-InvariantMemory.llx
Normal file
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user