From: Craig Topper Date: Sun, 8 Sep 2019 19:24:42 +0000 (+0000) Subject: [X86] Use DAG.getConstant instead of getZeroVector in combinePMULDQ. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b414d577f2e8254ce6776e9afc18525ff08dda7;p=llvm [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371345 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index c7844220dfc..3950b292ab3 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -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();