summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
index b0dcf476db3..f5adfa542a3 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
@@ -135,9 +135,10 @@ bool BaseIndexOffset::computeAliasing(const BaseIndexOffset &BasePtr0,
return false; // Cannot determine whether the pointers alias.
}
-bool BaseIndexOffset::contains(int64_t Size, const BaseIndexOffset &Other,
- int64_t OtherSize, const SelectionDAG &DAG,
- int64_t &Offset) const {
+bool BaseIndexOffset::contains(const SelectionDAG &DAG, int64_t BitSize,
+ const BaseIndexOffset &Other,
+ int64_t OtherBitSize, int64_t &BitOffset) const {
+ int64_t Offset;
if (!equalBaseIndex(Other, DAG, Offset))
return false;
if (Offset >= 0) {
@@ -145,7 +146,8 @@ bool BaseIndexOffset::contains(int64_t Size, const BaseIndexOffset &Other,
// [-------*this---------]
// [---Other--]
// ==Offset==>
- return Offset + OtherSize <= Size;
+ BitOffset = 8 * Offset;
+ return BitOffset + OtherBitSize <= BitSize;
}
// Other starts strictly before *this, it cannot be fully contained.
// [-------*this---------]
OpenPOWER on IntegriCloud