forked from OSchip/llvm-project
[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:
parent
e7694f34ab
commit
794f7591ec
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue