projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e22814b
)
Make DAGCombiner's global alias analysis query more precise in the case
author
Dan Gohman
<gohman@apple.com>
Mon, 27 Aug 2007 16:32:11 +0000
(16:32 +0000)
committer
Dan Gohman
<gohman@apple.com>
Mon, 27 Aug 2007 16:32:11 +0000
(16:32 +0000)
where both pointers have non-zero offsets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41491
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index fda0589a6de4de2662af49310ca00be5c9126efb..0514bc181bec0dfcd37d8e83e516931713116013 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@
-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)