forked from OSchip/llvm-project
[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:
parent
dac34f52d3
commit
97d41b8917
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue