mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Add a basic-aa test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5516 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,3 +40,14 @@ int %constant_array_index_test() {
|
|||||||
ret int %Val
|
ret int %Val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Test that if two pointers are spaced out by a constant getelementptr, that
|
||||||
|
; they cannot alias.
|
||||||
|
int %gep_distance_test(int* %A) {
|
||||||
|
%REMOVEu = load int* %A
|
||||||
|
%B = getelementptr int* %A, long 2 ; Cannot alias A
|
||||||
|
store int 7, int* %B
|
||||||
|
%REMOVEv = load int* %A
|
||||||
|
%r = sub int %REMOVEu, %REMOVEv
|
||||||
|
ret int %r
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -40,3 +40,14 @@ int %constant_array_index_test() {
|
|||||||
ret int %Val
|
ret int %Val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Test that if two pointers are spaced out by a constant getelementptr, that
|
||||||
|
; they cannot alias.
|
||||||
|
int %gep_distance_test(int* %A) {
|
||||||
|
%REMOVEu = load int* %A
|
||||||
|
%B = getelementptr int* %A, long 2 ; Cannot alias A
|
||||||
|
store int 7, int* %B
|
||||||
|
%REMOVEv = load int* %A
|
||||||
|
%r = sub int %REMOVEu, %REMOVEv
|
||||||
|
ret int %r
|
||||||
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user