[llvm] 0215ae9 - [X86] Remove incomplete custom handling of i128 sdivrem/udivrem on Windows.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 5 23:01:43 PDT 2020
Author: Craig Topper
Date: 2020-08-05T23:01:07-07:00
New Revision: 0215ae9735376ab527f32a68b2fcc9eb540f48c8
URL: https://github.com/llvm/llvm-project/commit/0215ae9735376ab527f32a68b2fcc9eb540f48c8
DIFF: https://github.com/llvm/llvm-project/commit/0215ae9735376ab527f32a68b2fcc9eb540f48c8.diff
LOG: [X86] Remove incomplete custom handling of i128 sdivrem/udivrem on Windows.
We need to have special handling of i128 div/rem on Windows due
to a weird calling convention needed for the libcall. There was
also some code that made it look like we do the same for sdivrem/udiv,
but the code didn't account for multiple return values of those
functions so couldn't possibly work. I think this code never
triggers because we don't have libcall names defined for those
functions by default so DAGCombine never creates DIVREM nodes.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 37097a147ffe..729c4207c8b6 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -1929,8 +1929,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
setOperationAction(ISD::UDIV, MVT::i128, Custom);
setOperationAction(ISD::SREM, MVT::i128, Custom);
setOperationAction(ISD::UREM, MVT::i128, Custom);
- setOperationAction(ISD::SDIVREM, MVT::i128, Custom);
- setOperationAction(ISD::UDIVREM, MVT::i128, Custom);
}
// On 32 bit MSVC, `fmodf(f32)` is not defined - only `fmod(f64)`
@@ -26899,8 +26897,6 @@ SDValue X86TargetLowering::LowerWin64_i128OP(SDValue Op, SelectionDAG &DAG) cons
case ISD::UDIV: isSigned = false; LC = RTLIB::UDIV_I128; break;
case ISD::SREM: isSigned = true; LC = RTLIB::SREM_I128; break;
case ISD::UREM: isSigned = false; LC = RTLIB::UREM_I128; break;
- case ISD::SDIVREM: isSigned = true; LC = RTLIB::SDIVREM_I128; break;
- case ISD::UDIVREM: isSigned = false; LC = RTLIB::UDIVREM_I128; break;
}
SDLoc dl(Op);
@@ -29535,10 +29531,6 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N,
return;
}
- LLVM_FALLTHROUGH;
- }
- case ISD::SDIVREM:
- case ISD::UDIVREM: {
SDValue V = LowerWin64_i128OP(SDValue(N,0), DAG);
Results.push_back(V);
return;
More information about the llvm-commits
mailing list