diff options
author | Craig Topper <craig.topper@intel.com> | 2018-07-30 21:04:38 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-07-30 21:04:38 +0000 |
commit | 42d312bb83c06a1fdd74b3a2e027cfd529fa0460 (patch) | |
tree | e9dd8cac716f86e7e496e86e4fdcbe628d636c5b /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | a568a27dfa450d42452cb348482924da25e934c9 (diff) | |
download | bcm5719-llvm-42d312bb83c06a1fdd74b3a2e027cfd529fa0460.tar.gz bcm5719-llvm-42d312bb83c06a1fdd74b3a2e027cfd529fa0460.zip |
[TargetLowering] In BuildSDIV, add the MULHS/SMUL_LOHI to the Created vector.
BuildUDIV was already correct.
llvm-svn: 338304
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index b2537476dad..273c2239ac7 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/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)); |