mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Add a new test for basicaa
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5625 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
006a4a5990
commit
7b9b1f9ad3
@ -51,3 +51,14 @@ int %gep_distance_test(int* %A) {
|
||||
ret int %r
|
||||
}
|
||||
|
||||
; Test that if two pointers are spaced out by a constant offset, that they
|
||||
; cannot alias, even if there is a variable offset between them...
|
||||
int %gep_distance_test2({int,int}* %A, long %distance) {
|
||||
%A = getelementptr {int,int}* %A, long 0, ubyte 0
|
||||
%REMOVEu = load int* %A
|
||||
%B = getelementptr {int,int}* %A, long %distance, ubyte 1
|
||||
store int 7, int* %B ; B cannot alias A, it's at least 4 bytes away
|
||||
%REMOVEv = load int* %A
|
||||
%r = sub int %REMOVEu, %REMOVEv
|
||||
ret int %r
|
||||
}
|
||||
|
@ -51,3 +51,14 @@ int %gep_distance_test(int* %A) {
|
||||
ret int %r
|
||||
}
|
||||
|
||||
; Test that if two pointers are spaced out by a constant offset, that they
|
||||
; cannot alias, even if there is a variable offset between them...
|
||||
int %gep_distance_test2({int,int}* %A, long %distance) {
|
||||
%A = getelementptr {int,int}* %A, long 0, ubyte 0
|
||||
%REMOVEu = load int* %A
|
||||
%B = getelementptr {int,int}* %A, long %distance, ubyte 1
|
||||
store int 7, int* %B ; B cannot alias A, it's at least 4 bytes away
|
||||
%REMOVEv = load int* %A
|
||||
%r = sub int %REMOVEu, %REMOVEv
|
||||
ret int %r
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user