[PATCH] D116421: [RISCV][LegalizeIntegerTypes] Teach PromoteSetCCOperands not to sext i32 comparisons for RV64 if the promoted values are already zero extended.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 30 13:25:49 PST 2021


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

This is similar to what is done for targets that prefer zero extend
where we avoid using a zero extend if the promoted values are sign
extended.

I've also applied these checks to ugt, ult, uge, and ule. This helps
the fpclamptosat tests for RV64, but did not affect any tests for other
targets.

While there I renamed the NewLHS and NewRHS variables to just LHS
and RHS. The 'New' only made sense in the context of them being
outputs of the function, but they are also inputs.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116421

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  llvm/test/CodeGen/RISCV/fpclamptosat.ll
  llvm/test/CodeGen/RISCV/fpclamptosat_vec.ll
  llvm/test/CodeGen/RISCV/half-convert.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116421.396713.patch
Type: text/x-patch
Size: 11258 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211230/83300479/attachment.bin>


More information about the llvm-commits mailing list