[X86] Use isOneConstant to simplify some code. NFC

This commit is contained in:
Craig Topper 2019-12-29 16:22:10 -08:00
parent 599d070910
commit b2f19320dc
1 changed files with 1 additions and 2 deletions

View File

@ -42496,8 +42496,7 @@ static SDValue foldXor1SetCC(SDNode *N, SelectionDAG &DAG) {
return SDValue();
SDValue LHS = N->getOperand(0);
auto *RHSC = dyn_cast<ConstantSDNode>(N->getOperand(1));
if (!RHSC || RHSC->getZExtValue() != 1 || LHS->getOpcode() != X86ISD::SETCC)
if (!OneConstant(N->getOperand(1)) || LHS->getOpcode() != X86ISD::SETCC)
return SDValue();
X86::CondCode NewCC = X86::GetOppositeBranchCondition(