forked from OSchip/llvm-project
Make DAGCombiner's global alias analysis query more precise in the case
where both pointers have non-zero offsets. llvm-svn: 41491
This commit is contained in:
parent
90064ed445
commit
9625d812c9
|
@ -4606,8 +4606,9 @@ bool DAGCombiner::isAlias(SDOperand Ptr1, int64_t Size1,
|
|||
|
||||
if (CombinerGlobalAA) {
|
||||
// Use alias analysis information.
|
||||
int Overlap1 = Size1 + SrcValueOffset1;
|
||||
int Overlap2 = Size2 + SrcValueOffset2;
|
||||
int64_t MinOffset = std::min(SrcValueOffset1, SrcValueOffset2);
|
||||
int64_t Overlap1 = Size1 + SrcValueOffset1 - MinOffset;
|
||||
int64_t Overlap2 = Size2 + SrcValueOffset2 - MinOffset;
|
||||
AliasAnalysis::AliasResult AAResult =
|
||||
AA.alias(SrcValue1, Overlap1, SrcValue2, Overlap2);
|
||||
if (AAResult == AliasAnalysis::NoAlias)
|
||||
|
|
Loading…
Reference in New Issue