[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.

llvm-svn: 367721
This commit is contained in:
Simon Pilgrim 2019-08-02 21:07:07 +00:00
parent e7694f34ab
commit 794f7591ec
1 changed files with 1 additions and 1 deletions

View File

@ -680,7 +680,7 @@ SDValue TargetLowering::SimplifyMultipleUseDemandedBits(
// 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;