[llvm] r367721 - [TargetLowering] SimplifyMultipleUseDemandedBits - don't assume INSERT_VECTOR_ELT value type is simple.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 14:07:08 PDT 2019


Author: rksimon
Date: Fri Aug  2 14:07:07 2019
New Revision: 367721

URL: http://llvm.org/viewvc/llvm-project?rev=367721&view=rev
Log:
[TargetLowering] SimplifyMultipleUseDemandedBits - don't assume INSERT_VECTOR_ELT value type is simple.

Noticed by inspection - this was copied from the X86 target equivalent where we can assume its legal/simple.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=367721&r1=367720&r2=367721&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Fri Aug  2 14:07:07 2019
@@ -680,7 +680,7 @@ SDValue TargetLowering::SimplifyMultiple
     // If we don't demand the inserted element, return the base vector.
     SDValue Vec = Op.getOperand(0);
     auto *CIdx = dyn_cast<ConstantSDNode>(Op.getOperand(2));
-    MVT VecVT = Vec.getSimpleValueType();
+    EVT VecVT = Vec.getValueType();
     if (CIdx && CIdx->getAPIntValue().ult(VecVT.getVectorNumElements()) &&
         !DemandedElts[CIdx->getZExtValue()])
       return Vec;




More information about the llvm-commits mailing list