Simplify some getNode calls.
[oota-llvm.git] / test / Analysis / BasicAA / 2004-01-29-InvariantMemory.ll
1 ; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | \
2 ; RUN:    llvm-dis | not grep load
3
4 @X = constant [2 x i32] [i32 4, i32 5]
5
6 define i32 @test(i32* %Y, i64 %idx) {
7     %P = getelementptr [2 x i32]* @X, i64 0, i64 %idx
8         %A = load i32* %P      ; Load from invariant memory
9         store i32 4, i32* %Y   ; Store could not be to @X
10         %B = load i32* %P
11         %C = sub i32 %A, %B
12         ret i32 %C
13 }