diff options
Diffstat (limited to 'test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx')
-rw-r--r-- | test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx b/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx index c8c30f989c..692c6f8693 100644 --- a/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx +++ b/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx @@ -1,13 +1,13 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | \ +; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | \ ; RUN: llvm-dis | not grep load -%X = constant [2 x int] [int 4, int 5] +@X = constant [2 x i32] [i32 4, i32 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 +define i32 @test(i32* %Y, i64 %idx) { + %P = getelementptr [2 x i32]* @X, i64 0, i64 %idx + %A = load i32* %P ; Load from invariant memory + store i32 4, i32* %Y ; Store could not be to @X + %B = load i32* %P + %C = sub i32 %A, %B + ret i32 %C } |