[llvm-branch-commits] [llvm-branch] r293294 - LLVM 4.0: cherry-pick r293293 - "Fix BasicAA incorrect assumption on GEP"
Mehdi Amini via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jan 27 08:16:33 PST 2017
Author: mehdi_amini
Date: Fri Jan 27 10:16:33 2017
New Revision: 293294
URL: http://llvm.org/viewvc/llvm-project?rev=293294&view=rev
Log:
LLVM 4.0: cherry-pick r293293 - "Fix BasicAA incorrect assumption on GEP"
Added:
llvm/branches/release_40/test/Analysis/BasicAA/pr31761.ll
- copied unchanged from r293293, llvm/trunk/test/Analysis/BasicAA/pr31761.ll
Modified:
llvm/branches/release_40/ (props changed)
llvm/branches/release_40/lib/Analysis/BasicAliasAnalysis.cpp
Propchange: llvm/branches/release_40/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 27 10:16:33 2017
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,291858-291859,291863,291875,291909,291966,291968,291979,292133,292242,292254-292255,292280,292323,292444,292467,292583,292625,292641,292651,292667,292711,292758,293025,293291
+/llvm/trunk:155241,291858-291859,291863,291875,291909,291966,291968,291979,292133,292242,292254-292255,292280,292323,292444,292467,292583,292625,292641,292651,292667,292711,292758,293025,293291,293293
Modified: llvm/branches/release_40/lib/Analysis/BasicAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_40/lib/Analysis/BasicAliasAnalysis.cpp?rev=293294&r1=293293&r2=293294&view=diff
==============================================================================
--- llvm/branches/release_40/lib/Analysis/BasicAliasAnalysis.cpp (original)
+++ llvm/branches/release_40/lib/Analysis/BasicAliasAnalysis.cpp Fri Jan 27 10:16:33 2017
@@ -1191,14 +1191,14 @@ AliasResult BasicAAResult::aliasGEP(cons
return MayAlias;
AliasResult R = aliasCheck(UnderlyingV1, MemoryLocation::UnknownSize,
- AAMDNodes(), V2, V2Size, V2AAInfo,
- nullptr, UnderlyingV2);
+ AAMDNodes(), V2, MemoryLocation::UnknownSize,
+ V2AAInfo, nullptr, UnderlyingV2);
if (R != MustAlias)
// If V2 may alias GEP base pointer, conservatively returns MayAlias.
// If V2 is known not to alias GEP base pointer, then the two values
- // cannot alias per GEP semantics: "A pointer value formed from a
- // getelementptr instruction is associated with the addresses associated
- // with the first operand of the getelementptr".
+ // cannot alias per GEP semantics: "Any memory access must be done through
+ // a pointer value associated with an address range of the memory access,
+ // otherwise the behavior is undefined.".
return R;
// If the max search depth is reached the result is undefined
More information about the llvm-branch-commits
mailing list