[llvm] r365656 - [X86] EltsFromConsecutiveLoads - remove duplicate check for element size. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 09:22:31 PDT 2019


Author: rksimon
Date: Wed Jul 10 09:22:31 2019
New Revision: 365656

URL: http://llvm.org/viewvc/llvm-project?rev=365656&view=rev
Log:
[X86] EltsFromConsecutiveLoads - remove duplicate check for element size. NFCI.

We've already checked that each element is the correct contributory size for VT when we inspect the elements for Undef/Zero/Load.

Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=365656&r1=365655&r2=365656&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jul 10 09:22:31 2019
@@ -7614,12 +7614,6 @@ static SDValue EltsFromConsecutiveLoads(
   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();
 




More information about the llvm-commits mailing list