]> granicus.if.org Git - llvm/commitdiff
[X86] EltsFromConsecutiveLoads - remove duplicate check for element size. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 10 Jul 2019 16:22:31 +0000 (16:22 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 10 Jul 2019 16:22:31 +0000 (16:22 +0000)
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

lib/Target/X86/X86ISelLowering.cpp

index c5f1234fe92e8a3143c5f2264f819874c728f5f5..ad6246a7ca203eaa20f34214adad02e5a4dc383a 100644 (file)
@@ -7614,12 +7614,6 @@ static SDValue EltsFromConsecutiveLoads(EVT VT, ArrayRef<SDValue> Elts,
   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();