mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-19 02:03:11 +00:00
Add a basic-aa test
llvm-svn: 5516
This commit is contained in:
parent
dcf8d02380
commit
f14d8e2bf1
@ -40,3 +40,14 @@ int %constant_array_index_test() {
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user