We've already checked that each element is the correct contributory size for VT when we inspect the elements for Undef/Zero/Load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365656
91177308-0d34-0410-b5e6-
96231b3b80d8
if (FirstLoadedElt == 0 &&
(LastLoadedElt == (int)(NumElems - 1) || IsDereferenceable) &&
(IsConsecutiveLoad || IsConsecutiveLoadWithZeros)) {
- EVT EltVT = LDBase->getValueType(0);
- // Ensure that the input vector size for the merged loads matches the
- // cumulative size of the input elements.
- if (VT.getSizeInBits() != EltVT.getSizeInBits() * NumElems)
- return SDValue();
-
if (isAfterLegalize && !TLI.isOperationLegal(ISD::LOAD, VT))
return SDValue();