[X86] Use ISD::PARITY directly instead of emitting CTPOP and AND from combineHorizontalPredicateResult.

We have a PARITY ISD node now so might as well use it. It will
get re-expanded later.
This commit is contained in:
Craig Topper 2020-09-12 18:09:27 -07:00
parent 9d300bc8d2
commit 758732a34e
1 changed files with 2 additions and 4 deletions

View File

@ -39373,10 +39373,8 @@ static SDValue combineHorizontalPredicateResult(SDNode *Extract,
MVT CmpVT = NumElts == 64 ? MVT::i64 : MVT::i32;
if (BinOp == ISD::XOR) {
// parity -> (AND (CTPOP(MOVMSK X)), 1)
SDValue Mask = DAG.getConstant(1, DL, CmpVT);
SDValue Result = DAG.getNode(ISD::CTPOP, DL, CmpVT, Movmsk);
Result = DAG.getNode(ISD::AND, DL, CmpVT, Result, Mask);
// parity -> (PARITY(MOVMSK X))
SDValue Result = DAG.getNode(ISD::PARITY, DL, CmpVT, Movmsk);
return DAG.getZExtOrTrunc(Result, DL, ExtractVT);
}