diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2007-08-06 20:57:16 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2007-08-06 20:57:16 +0000 |
commit | a583990ec83a4773608084a9694943ddd268e571 (patch) | |
tree | 0003775900ff0a0121087c0aff4d76e98679290c /test | |
parent | b1183c1ff3b17689c036d5e7443b7343074d2f6f (diff) | |
download | external_llvm-a583990ec83a4773608084a9694943ddd268e571.zip external_llvm-a583990ec83a4773608084a9694943ddd268e571.tar.gz external_llvm-a583990ec83a4773608084a9694943ddd268e571.tar.bz2 |
This resolves a regression of BasicAA which failed to find any memory information for overloaded intrinsics (PR1600). This resolves that issue, and improves the matching scheme to use a BitVector rather than a binary search.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/BasicAA/2007-08-05-GetOverloadedModRef.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Analysis/BasicAA/2007-08-05-GetOverloadedModRef.ll b/test/Analysis/BasicAA/2007-08-05-GetOverloadedModRef.ll new file mode 100644 index 0000000..c555f63 --- /dev/null +++ b/test/Analysis/BasicAA/2007-08-05-GetOverloadedModRef.ll @@ -0,0 +1,17 @@ +; PR1600 +; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | \ +; RUN: grep {ret i32 0} +; END. + +declare i16 @llvm.cttz.i16(i16) + +define i32 @test(i32* %P, i16* %Q) { + %A = load i16* %Q ; <i16> [#uses=1] + %x = load i32* %P ; <i32> [#uses=1] + %B = call i16 @llvm.cttz.i16( i16 %A ) ; <i16> [#uses=1] + %y = load i32* %P ; <i32> [#uses=1] + store i16 %B, i16* %Q + %z = sub i32 %x, %y ; <i32> [#uses=1] + ret i32 %z +} + |