[llvm] r262841 - [ScopedNoAliasAA] Make test basic.ll less confusing
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 7 09:49:10 PST 2016
Author: anemet
Date: Mon Mar 7 11:49:10 2016
New Revision: 262841
URL: http://llvm.org/viewvc/llvm-project?rev=262841&view=rev
Log:
[ScopedNoAliasAA] Make test basic.ll less confusing
Summary:
This testcase had me confused. It made me believe that you can use
alias scopes and alias scopes list interchangeably with alias.scope and
noalias. Both langref and the other testcase use scope lists so I went
looking.
Turns out using scope directly only happens to work by chance. When
ScopedNoAliasAAResult::mayAliasInScopes traverses this as a scope list:
!1 = !{!1, !0, !"some scope"}
, the first entry is in fact a scope but only because the scope is
happened to be defined self-referentially to make it unique globally.
The remaining elements in the tuple (!0, !"some scope") are considered
as scopes but AliasScopeNode::getDomain will just bail on those without
any error.
This change avoids this ambiguity in the test but I've also been
wondering if we should issue some sort of a diagnostics.
Reviewers: dexonsmith, hfinkel
Subscribers: mssimpso, llvm-commits
Differential Revision: http://reviews.llvm.org/D16670
Modified:
llvm/trunk/test/Analysis/ScopedNoAliasAA/basic.ll
Modified: llvm/trunk/test/Analysis/ScopedNoAliasAA/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/ScopedNoAliasAA/basic.ll?rev=262841&r1=262840&r2=262841&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/ScopedNoAliasAA/basic.ll (original)
+++ llvm/trunk/test/Analysis/ScopedNoAliasAA/basic.ll Mon Mar 7 11:49:10 2016
@@ -6,9 +6,9 @@ target triple = "x86_64-unknown-linux-gn
define void @foo1(float* nocapture %a, float* nocapture readonly %c) #0 {
entry:
; CHECK-LABEL: Function: foo1
- %0 = load float, float* %c, align 4, !alias.scope !1
+ %0 = load float, float* %c, align 4, !alias.scope !2
%arrayidx.i = getelementptr inbounds float, float* %a, i64 5
- store float %0, float* %arrayidx.i, align 4, !noalias !1
+ store float %0, float* %arrayidx.i, align 4, !noalias !2
%1 = load float, float* %c, align 4
%arrayidx = getelementptr inbounds float, float* %a, i64 7
store float %1, float* %arrayidx, align 4
@@ -25,4 +25,4 @@ attributes #0 = { nounwind uwtable }
!0 = !{!0, !"some domain"}
!1 = !{!1, !0, !"some scope"}
-
+!2 = !{!1}
More information about the llvm-commits
mailing list