mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-25 14:32:53 +00:00
e78760e179
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8558 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
358 B
LLVM
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
|
|
}
|