diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-26 16:18:10 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-26 16:18:10 +0000 |
commit | f6ac4d9dadaa62959e04a0281e3bc5f4270fc260 (patch) | |
tree | 0338bfc3cfec9e27f68da330a34fafa7cd86a29a /test | |
parent | 61d24624005f3cb7973819217e9141febce37c61 (diff) | |
download | external_llvm-f6ac4d9dadaa62959e04a0281e3bc5f4270fc260.zip external_llvm-f6ac4d9dadaa62959e04a0281e3bc5f4270fc260.tar.gz external_llvm-f6ac4d9dadaa62959e04a0281e3bc5f4270fc260.tar.bz2 |
teach basicaa that A[i] != A[i+1].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89951 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/BasicAA/gep-alias.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Analysis/BasicAA/gep-alias.ll b/test/Analysis/BasicAA/gep-alias.ll index e8f8a8e..0c5f7ac 100644 --- a/test/Analysis/BasicAA/gep-alias.ll +++ b/test/Analysis/BasicAA/gep-alias.ll @@ -71,3 +71,19 @@ entry: ; CHECK: @test4 ; CHECK: ret i32 64 } + +; P[i] != p[i+1] +define i32 @test5(i32* %p, i64 %i) { + %pi = getelementptr i32* %p, i64 %i + %i.next = add i64 %i, 1 + %pi.next = getelementptr i32* %p, i64 %i.next + %x = load i32* %pi + store i32 42, i32* %pi.next + %y = load i32* %pi + %z = sub i32 %x, %y + ret i32 %z +; CHECK: @test5 +; CHECK: ret i32 0 +} + + |