[llvm] r338304 - [TargetLowering] In BuildSDIV, add the MULHS/SMUL_LOHI to the Created vector.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 30 14:04:39 PDT 2018


Author: ctopper
Date: Mon Jul 30 14:04:38 2018
New Revision: 338304

URL: http://llvm.org/viewvc/llvm-project?rev=338304&view=rev
Log:
[TargetLowering] In BuildSDIV, add the MULHS/SMUL_LOHI to the Created vector.

BuildUDIV was already correct.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=338304&r1=338303&r2=338304&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Jul 30 14:04:38 2018
@@ -3494,6 +3494,9 @@ SDValue TargetLowering::BuildSDIV(SDNode
                               DAG.getConstant(magics.m, dl, VT)).getNode(), 1);
   else
     return SDValue();       // No mulhs or equvialent
+
+  Created.push_back(Q.getNode());
+
   // If d > 0 and m < 0, add the numerator
   if (Divisor.isStrictlyPositive() && magics.m.isNegative()) {
     Q = DAG.getNode(ISD::ADD, dl, VT, Q, N->getOperand(0));




More information about the llvm-commits mailing list