[X86] getTargetConstantBitsFromNode - fix self-move assertions from gcc builds due to rL343375
llvm-svn: 343377
This commit is contained in:
parent
43e4e648ef
commit
a731940c60
|
@ -5748,11 +5748,15 @@ static bool getTargetConstantBitsFromNode(SDValue Op, unsigned EltSizeInBits,
|
|||
if (getTargetConstantBitsFromNode(Op.getOperand(0), EltSizeInBits,
|
||||
UndefElts, EltBits, AllowWholeUndefs,
|
||||
AllowPartialUndefs)) {
|
||||
EVT SrcVT = Op.getOperand(0).getValueType();
|
||||
unsigned NumSrcElts = SrcVT.getVectorNumElements();
|
||||
unsigned NumSubElts = VT.getVectorNumElements();
|
||||
unsigned BaseIdx = Op.getConstantOperandVal(1);
|
||||
UndefElts = UndefElts.extractBits(NumSubElts, BaseIdx);
|
||||
EltBits.erase(EltBits.begin() + BaseIdx + NumSubElts, EltBits.end());
|
||||
EltBits.erase(EltBits.begin(), EltBits.begin() + BaseIdx);
|
||||
if ((BaseIdx + NumSubElts) != NumSrcElts)
|
||||
EltBits.erase(EltBits.begin() + BaseIdx + NumSubElts, EltBits.end());
|
||||
if (BaseIdx != 0)
|
||||
EltBits.erase(EltBits.begin(), EltBits.begin() + BaseIdx);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue