[X86] Use isNullConstant helper. NFCI.

llvm-svn: 338516
This commit is contained in:
Simon Pilgrim 2018-08-01 11:24:11 +00:00
parent 18d025a732
commit e447a273bd
1 changed files with 1 additions and 2 deletions

View File

@ -37928,8 +37928,7 @@ static SDValue combineFMA(SDNode *N, SelectionDAG &DAG,
// Look through extract_vector_elts. If it comes from an FNEG, create a
// new extract from the FNEG input.
if (V.getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
isa<ConstantSDNode>(V.getOperand(1)) &&
cast<ConstantSDNode>(V.getOperand(1))->getZExtValue() == 0) {
isNullConstant(V.getOperand(1))) {
if (SDValue NegVal = isFNEG(V.getOperand(0).getNode())) {
NegVal = DAG.getBitcast(V.getOperand(0).getValueType(), NegVal);
V = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SDLoc(V), V.getValueType(),