New testcase for better mod/ref information that basicaa can provide

llvm-svn: 11023
This commit is contained in:
Chris Lattner 2004-01-30 22:18:47 +00:00
parent f0eac5d0d3
commit a96066186e
1 changed files with 12 additions and 0 deletions

View 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
}