llvm-6502/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx
Reid Spencer 4b3fd6c010 Convert test cases to new llvm.exp version of llvm_runtest and fix tests
that it found to be broken.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36009 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 19:27:03 +00:00

14 lines
399 B
Plaintext

; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | \
; RUN: 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
}