summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ExpandLargeDivRem.cpp
AgeCommit message (Collapse)Author
2024-11-12[CodeGen] Remove unused includes (NFC) (#115996)Kazu Hirata
Identified with misc-include-cleaner.
2024-04-02[ExpandLargeDivRem] Scalarize vector types. (#86959)Bevin Hansson
expand-large-divrem cannot handle vector types. If overly large vector element types survive into isel, they will likely be scalarized there, but since isel cannot handle scalar integer types of that size, it will assert. Handle vector types in expand-large-divrem by scalarizing them and then expanding the scalar type operation. For large vectors, this results in a *massive* code expansion, but it's better than asserting.
2023-11-03CodeGen: Port ExpandLargeDivRem to new pass manager (#71022)Matt Arsenault
2023-01-08[NFC] Hide implementation details in anonymous namespacesBenjamin Kramer
2022-09-12Move TargetTransformInfo::maxLegalDivRemBitWidth -> ↵Matthias Gehre
TargetLowering::maxSupportedDivRemBitWidth Also remove new-pass-manager version of ExpandLargeDivRem because there is no way yet to access TargetLowering in the new pass manager. Differential Revision: https://reviews.llvm.org/D133691
2022-09-06[llvm/CodeGen] Enable the ExpandLargeDivRem pass for X86, Arm and AArch64Matthias Gehre
This adds the ExpandLargeDivRem to the default pass pipeline. The limit at which it expands div/rem instructions is configured via a new TargetTransformInfo hook (default: no expansion) X86, Arm and AArch64 backends implement this hook to expand div/rem instructions with more than 128 bits. Differential Revision: https://reviews.llvm.org/D130076
2022-08-26[llvm/CodeGen] Add ExpandLargeDivRem passMatthias Gehre
Adds a pass ExpandLargeDivRem to expand div/rem instructions with more than 128 bits into a loop computing that value. As discussed on https://reviews.llvm.org/D120327, this approach has the advantage that it is independent of the runtime library. This also helps the clang driver, which otherwise would need to understand enough about the runtime library to know whether to allow _BitInts with more than 128 bits. Targets are still free to disable this pass and instead provide a faster implementation in a runtime library. Fixes https://github.com/llvm/llvm-project/issues/44994 Differential Revision: https://reviews.llvm.org/D126644