[X86] Use DAG.getConstant instead of getZeroVector in combinePMULDQ.

getZeroVector canonicalizes the type to vXi32, but that's a
legalization action. We should use the most correct type if
possible.

llvm-svn: 371345
This commit is contained in:
Craig Topper 2019-09-08 19:24:42 +00:00
parent dac34f52d3
commit 97d41b8917
1 changed files with 1 additions and 1 deletions

View File

@ -44768,7 +44768,7 @@ static SDValue combinePMULDQ(SDNode *N, SelectionDAG &DAG,
// Multiply by zero.
// Don't return RHS as it may contain UNDEFs.
if (ISD::isBuildVectorAllZeros(RHS.getNode()))
return getZeroVector(N->getSimpleValueType(0), Subtarget, DAG, SDLoc(N));
return DAG.getConstant(0, SDLoc(N), N->getValueType(0));
// PMULDQ/PMULUDQ only uses lower 32 bits from each vector element.
const TargetLowering &TLI = DAG.getTargetLoweringInfo();