Convert test cases to new llvm.exp version of llvm_runtest and fix tests
[oota-llvm.git] / test / Analysis / BasicAA / 2004-01-29-InvariantMemory.llx
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | \
2 ; RUN:    llvm-dis | not grep load
3
4 %X = constant [2 x int] [int 4, int 5]
5
6 int %test(int* %Y, long %idx) {
7         %P = getelementptr [2 x int]* %X, long 0, long %idx
8         %A = load int* %P      ; Load from invariant memory
9         store int 4, int* %Y   ; Store could not be to %X
10         %B = load int* %P
11         %C = sub int %A, %B
12         ret int %C
13 }