]> granicus.if.org Git - llvm/commitdiff
[TargetLowering] In BuildSDIV, add the MULHS/SMUL_LOHI to the Created vector.
authorCraig Topper <craig.topper@intel.com>
Mon, 30 Jul 2018 21:04:38 +0000 (21:04 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 30 Jul 2018 21:04:38 +0000 (21:04 +0000)
BuildUDIV was already correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338304 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/TargetLowering.cpp

index b2537476dad8836b2f1d747bc77af0977bc8b7ca..273c2239ac73800ece7a0221eaa7461d6565c013 100644 (file)
@@ -3494,6 +3494,9 @@ SDValue TargetLowering::BuildSDIV(SDNode *N, const APInt &Divisor,
                               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));