From: Craig Topper Date: Mon, 30 Jul 2018 21:04:38 +0000 (+0000) Subject: [TargetLowering] In BuildSDIV, add the MULHS/SMUL_LOHI to the Created vector. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9f23bb5b175e3153e3dcab592f4aa8638d89c1a;p=llvm [TargetLowering] In BuildSDIV, add the MULHS/SMUL_LOHI to the Created vector. BuildUDIV was already correct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338304 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index b2537476dad..273c2239ac7 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -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));