From 9b414d577f2e8254ce6776e9afc18525ff08dda7 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 8 Sep 2019 19:24:42 +0000 Subject: [PATCH] [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 --- lib/Target/X86/X86ISelLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.40.0