forked from OSchip/llvm-project
[X86] Use SDValue::operator== instead of DAG.isEqualTo in strictly integer matching.
isEqualTo is more useful for floating point. operator== is sufficient for integer. llvm-svn: 340130
This commit is contained in:
parent
3e299d896f
commit
2b03df9b05
|
@ -33046,7 +33046,7 @@ static SDValue combineSelect(SDNode *N, SelectionDAG &DAG,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Other.getNode() && Other->getNumOperands() == 2 &&
|
if (Other.getNode() && Other->getNumOperands() == 2 &&
|
||||||
DAG.isEqualTo(Other->getOperand(0), Cond.getOperand(0))) {
|
Other->getOperand(0) == Cond.getOperand(0)) {
|
||||||
SDValue OpLHS = Other->getOperand(0), OpRHS = Other->getOperand(1);
|
SDValue OpLHS = Other->getOperand(0), OpRHS = Other->getOperand(1);
|
||||||
SDValue CondRHS = Cond->getOperand(1);
|
SDValue CondRHS = Cond->getOperand(1);
|
||||||
|
|
||||||
|
@ -33059,7 +33059,7 @@ static SDValue combineSelect(SDNode *N, SelectionDAG &DAG,
|
||||||
// x >= y ? x-y : 0 --> subus x, y
|
// x >= y ? x-y : 0 --> subus x, y
|
||||||
// x > y ? x-y : 0 --> subus x, y
|
// x > y ? x-y : 0 --> subus x, y
|
||||||
if ((CC == ISD::SETUGE || CC == ISD::SETUGT) &&
|
if ((CC == ISD::SETUGE || CC == ISD::SETUGT) &&
|
||||||
Other->getOpcode() == ISD::SUB && DAG.isEqualTo(OpRHS, CondRHS))
|
Other->getOpcode() == ISD::SUB && OpRHS == CondRHS)
|
||||||
return SplitOpsAndApply(DAG, Subtarget, DL, VT, { OpLHS, OpRHS },
|
return SplitOpsAndApply(DAG, Subtarget, DL, VT, { OpLHS, OpRHS },
|
||||||
SUBUSBuilder);
|
SUBUSBuilder);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue