1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-31 07:52:55 +01:00
llvm-mirror/test/Regression/Analysis/BasicAA/2003-04-22-GEPProblem.ll
2004-07-29 01:34:10 +00:00

16 lines
358 B
LLVM

; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
; BasicAA was incorrectly concluding that P1 and P2 didn't conflict!
int %test(int *%Ptr, long %V) {
%P2 = getelementptr int* %Ptr, long 1
%P1 = getelementptr int* %Ptr, long %V
%X = load int* %P1
store int 5, int* %P2
%Y = load int* %P1
%Z = sub int %X, %Y
ret int %Z
}