diff options
author | Chris Lattner <sabre@nondot.org> | 2003-02-09 19:01:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-02-09 19:01:00 +0000 |
commit | 7e38fbe3741ea25d0eaabdbf6396227a7bc1dd5c (patch) | |
tree | 429534ea57e45e28847f8fc3e107e156258e7a9b /test/Analysis | |
parent | e0fbd48e197c8740165ae7a0701a0d40d6e59382 (diff) | |
download | external_llvm-7e38fbe3741ea25d0eaabdbf6396227a7bc1dd5c.zip external_llvm-7e38fbe3741ea25d0eaabdbf6396227a7bc1dd5c.tar.gz external_llvm-7e38fbe3741ea25d0eaabdbf6396227a7bc1dd5c.tar.bz2 |
Add a basic-aa test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/BasicAA/featuretest.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Analysis/BasicAA/featuretest.ll b/test/Analysis/BasicAA/featuretest.ll index d2be1ce..6884df2 100644 --- a/test/Analysis/BasicAA/featuretest.ll +++ b/test/Analysis/BasicAA/featuretest.ll @@ -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 +} + |