summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-07-10 12:22:59 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-07-10 12:22:59 +0000
commitef1aac319166d49a77427f39dff0594c16726b6a (patch)
tree5c2122c14177b0de9fc38bb8281f1ed89a3ee1e7
parent94c84aca5d47949fb7c7763925dbd1a627889b4a (diff)
downloadbcm5719-llvm-ef1aac319166d49a77427f39dff0594c16726b6a.tar.gz
bcm5719-llvm-ef1aac319166d49a77427f39dff0594c16726b6a.zip
[X86] EltsFromConsecutiveLoads - LDBase is non-null. NFCI.
Don't bother checking for LDBase != null - it should be (and we assert that it is). llvm-svn: 365622
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 1040cc6ae36..a33bf07cd72 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -7559,6 +7559,7 @@ static SDValue EltsFromConsecutiveLoads(EVT VT, ArrayRef<SDValue> Elts,
SDValue EltBase = peekThroughBitcasts(Elts[FirstLoadedElt]);
LoadSDNode *LDBase = Loads[FirstLoadedElt];
EVT LDBaseVT = EltBase.getValueType();
+ assert(LDBase && "Did not find base load for merging consecutive loads");
// Consecutive loads can contain UNDEFS but not ZERO elements.
// Consecutive loads with UNDEFs and ZEROs elements require a
@@ -7568,7 +7569,7 @@ static SDValue EltsFromConsecutiveLoads(EVT VT, ArrayRef<SDValue> Elts,
for (int i = FirstLoadedElt + 1; i <= LastLoadedElt; ++i) {
if (LoadMask[i]) {
SDValue Elt = peekThroughBitcasts(Elts[i]);
- LoadSDNode* LD = Loads[i];
+ LoadSDNode *LD = Loads[i];
if (!DAG.areNonVolatileConsecutiveLoads(
LD, LDBase, Elt.getValueType().getStoreSizeInBits() / 8,
i - FirstLoadedElt)) {
@@ -7595,10 +7596,8 @@ static SDValue EltsFromConsecutiveLoads(EVT VT, ArrayRef<SDValue> Elts,
};
// Check if the base load is entirely dereferenceable.
- bool IsDereferenceable =
- LDBase &&
- LDBase->getPointerInfo().isDereferenceable(
- VT.getSizeInBits() / 8, *DAG.getContext(), DAG.getDataLayout());
+ bool IsDereferenceable = LDBase->getPointerInfo().isDereferenceable(
+ VT.getSizeInBits() / 8, *DAG.getContext(), DAG.getDataLayout());
// LOAD - all consecutive load/undefs (must start/end with a load or be
// entirely dereferenceable). If we have found an entire vector of loads and
@@ -7608,7 +7607,6 @@ static SDValue EltsFromConsecutiveLoads(EVT VT, ArrayRef<SDValue> Elts,
if (FirstLoadedElt == 0 &&
(LastLoadedElt == (int)(NumElems - 1) || IsDereferenceable) &&
(IsConsecutiveLoad || IsConsecutiveLoadWithZeros)) {
- assert(LDBase && "Did not find base load for merging consecutive loads");
EVT EltVT = LDBase->getValueType(0);
// Ensure that the input vector size for the merged loads matches the
// cumulative size of the input elements.
OpenPOWER on IntegriCloud