[SelectionDAG] Emit calls to __divei4 and friends for division/remainder of large...
authorMatthias Gehre <matthias.gehre@xilinx.com>
Tue, 22 Feb 2022 15:32:17 +0000 (15:32 +0000)
committerMatthias Gehre <matthias.gehre@xilinx.com>
Wed, 16 Mar 2022 09:36:28 +0000 (09:36 +0000)
commit09854f2af3b914b616f29cb640bede3a27cf7c4e
tree268d56bcdfa67ccf9e3d122e0ebf31ae7c1eb39a
parentf3cbe60aa9628ef9b210af8a74b8fd3de3dfd972
[SelectionDAG] Emit calls to __divei4 and friends for division/remainder of large integers

Emit calls to __divei4 and friends for divison/remainder of large integers.

This fixes https://github.com/llvm/llvm-project/issues/44994.

The overall RFC is in https://discourse.llvm.org/t/rfc-add-support-for-division-of-large-bitint-builtins-selectiondag-globalisel-clang/60329

The compiler-rt part is in https://reviews.llvm.org/D120327

Differential Revision: https://reviews.llvm.org/D120329
llvm/include/llvm/IR/RuntimeLibcalls.def
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/test/CodeGen/AArch64/udivmodei5.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/udivmodei5.ll [new file with mode: 0644]