forked from OSchip/llvm-project
ADD / SUB / SMUL / UMUL with overflow second result top bits must be zero.
llvm-svn: 63509
This commit is contained in:
parent
7e4cb0a1cf
commit
dc636c4080
|
@ -7515,6 +7515,14 @@ void X86TargetLowering::computeMaskedBitsForTargetNode(const SDValue Op,
|
||||||
KnownZero = KnownOne = APInt(Mask.getBitWidth(), 0); // Don't know anything.
|
KnownZero = KnownOne = APInt(Mask.getBitWidth(), 0); // Don't know anything.
|
||||||
switch (Opc) {
|
switch (Opc) {
|
||||||
default: break;
|
default: break;
|
||||||
|
case X86ISD::ADD:
|
||||||
|
case X86ISD::SUB:
|
||||||
|
case X86ISD::SMUL:
|
||||||
|
case X86ISD::UMUL:
|
||||||
|
// These nodes' second result is a boolean.
|
||||||
|
if (Op.getResNo() == 0)
|
||||||
|
break;
|
||||||
|
// Fallthrough
|
||||||
case X86ISD::SETCC:
|
case X86ISD::SETCC:
|
||||||
KnownZero |= APInt::getHighBitsSet(Mask.getBitWidth(),
|
KnownZero |= APInt::getHighBitsSet(Mask.getBitWidth(),
|
||||||
Mask.getBitWidth() - 1);
|
Mask.getBitWidth() - 1);
|
||||||
|
|
Loading…
Reference in New Issue