forked from OSchip/llvm-project
[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:
parent
9d300bc8d2
commit
758732a34e
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue