[PATCH] D98233: [RISCV] Improve legalization of i32 UADDO/USUBO on RV64.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 8 21:03:30 PST 2021


craig.topper created this revision.
craig.topper added reviewers: asb, luismarques, frasercrmck.
Herald added subscribers: StephenFan, vkmr, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya.
craig.topper requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLVM.

The default legalization uses zero extends that require pair of shifts
on RISCV. Instead we can take advantage of the fact that unsigned
compares work equally well on sign extended inputs. This allows
us to use addw/subw and sext.w.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98233

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/xaluo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98233.329202.patch
Type: text/x-patch
Size: 6947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210309/e95640cb/attachment.bin>


More information about the llvm-commits mailing list