Skip to content

Commit 1499880

Browse files
authored
[RISCV] Expand divisions larger than 64 bits on RV32. (llvm#163688)
The __(u)divti3, __(u)modti3 functions don't exist in libgcc for RV32.
1 parent 581b654 commit 1499880

File tree

2 files changed

+2307
-6
lines changed

2 files changed

+2307
-6
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,6 +1672,8 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
16721672
if (Subtarget.useRVVForFixedLengthVectors())
16731673
setTargetDAGCombine(ISD::BITCAST);
16741674

1675+
setMaxDivRemBitWidthSupported(Subtarget.is64Bit() ? 128 : 64);
1676+
16751677
// Disable strict node mutation.
16761678
IsStrictFPEnabled = true;
16771679
EnableExtLdPromotion = true;

0 commit comments

Comments
 (0)