Since i128 isn't a legal C type on RV32, I don't believe
libgcc implements these functions for RV32. compiler-rt
does implement them because i128 support is enabled
in order to handle long double.
This is consistent with 32-bit X86 and ARM.
Paths
| Differential D109383
[RISCV] Disable use of i128 shift libcalls on RV32. ClosedPublic Authored by craig.topper on Sep 7 2021, 12:16 PM.
Details Summary Since i128 isn't a legal C type on RV32, I don't believe This is consistent with 32-bit X86 and ARM.
Diff Detail
Event TimelineHerald added subscribers: StephenFan, vkmr, frasercrmck and 26 others. · View Herald TranscriptSep 7 2021, 12:16 PM Comment Actions On rv32, we pass the clang flag to enable i128 support when we build compiler-rt, so __ashlti3 is available. Not sure about libgcc. Comment Actions
IIRC, RV32 require to enable i128 since the f128 routines need that, and f128 is necessary for RISC-V because long double is 128 bit floating point, however the libgcc part has technical issue on support soft i128 for 32 bits target, which is not only for RV32 but also for all other 32 bits target in GCC. But compiler-rt didn't have such technical issue, so in theory __int128 could be used for RV32 on clang, but we didn't turn it on by default is because we want to make sure the compatiblitiy between GCC, or in another word compatible with libgcc. This revision is now accepted and ready to land.Sep 8 2021, 2:08 PM This revision was landed with ongoing or failed builds.Sep 8 2021, 2:42 PM Closed by commit rGa574f0e0c347: [RISCV] Disable use of i128 shift libcalls on RV32. (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 371449 llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/shifts.ll
|