diff options
author | Dan Gohman <gohman@apple.com> | 2010-10-18 21:28:00 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-10-18 21:28:00 +0000 |
commit | fb8096dee5df60f156e770b9f96f8417e9dbd4c9 (patch) | |
tree | b350cb9cdd41c4464e549dcb6c3593f325e5f82e /test | |
parent | b41ee96d76ccf1eec2fd898def4cfd7c16868708 (diff) | |
download | external_llvm-fb8096dee5df60f156e770b9f96f8417e9dbd4c9.zip external_llvm-fb8096dee5df60f156e770b9f96f8417e9dbd4c9.tar.gz external_llvm-fb8096dee5df60f156e770b9f96f8417e9dbd4c9.tar.bz2 |
Don't pass the raw invalid pointer used to represent conflicting
TBAA information to AliasAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/TypeBasedAliasAnalysis/licm.ll | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/Analysis/TypeBasedAliasAnalysis/licm.ll b/test/Analysis/TypeBasedAliasAnalysis/licm.ll index eedc1e8..aa0ebdb 100644 --- a/test/Analysis/TypeBasedAliasAnalysis/licm.ll +++ b/test/Analysis/TypeBasedAliasAnalysis/licm.ll @@ -3,6 +3,7 @@ ; LICM should be able to hoist the address load out of the loop ; by using TBAA information. +; CHECK: @foo ; CHECK: entry: ; CHECK-NEXT: %tmp3 = load double** @P, !tbaa !0 ; CHECK-NEXT: br label %for.body @@ -31,3 +32,30 @@ for.end: ; preds = %for.body, %entry !0 = metadata !{metadata !"root", null} !1 = metadata !{metadata !"pointer", metadata !0} !2 = metadata !{metadata !"double", metadata !0} + +; LICM shouldn't hoist anything here. + +; CHECK: @bar +; CHECK: loop: +; CHECK: load +; CHECK: store +; CHECK: load +; CHECK: store +; CHECK: br label %loop + +define void @bar(i8** %p) nounwind { +entry: + %q = bitcast i8** %p to i8* + br label %loop + +loop: + %tmp51 = load i8** %p, !tbaa !4 + store i8* %tmp51, i8** %p + %tmp40 = load i8* %q, !tbaa !5 + store i8 %tmp40, i8* %q + br label %loop +} + +!3 = metadata !{metadata !"pointer", metadata !4} +!4 = metadata !{metadata !"char", metadata !5} +!5 = metadata !{metadata !"root", null} |