[PATCH] D95322: [RISCV] Custom type legalize i8/i16 UDIV/UREM/SDIV on RV64 so we can use divuw/remuw/divw.
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 08:02:46 PST 2021
jrtc27 added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2180
+ // We only care about the lower 32 bits.
+ Known = KnownBits::urem(Known.trunc(32), Known2.trunc(32));
+ // Restore the original width by sign extending.
----------------
Do these do the right thing for 0 (which RISC-V defines as saturating)? Or do we not care because it's UB in the IR?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95322/new/
https://reviews.llvm.org/D95322
More information about the llvm-commits
mailing list