[PATCH] D151180: [RISCV] select(C0, x, select(C1, x, y)) -> select(C0|C1, x, y)
Liao Chunyu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 23:31:23 PDT 2023
liaolucy created this revision.
liaolucy added reviewers: craig.topper, reames, asb.
Herald added subscribers: jobnoorman, luke, VincentWu, armkevincheng, sjarus, eric-k256, vkmr, frasercrmck, luismarques, 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, arichardson.
Herald added a project: All.
liaolucy requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
RV32, ExpandIntRes_MINMAX expanding i64 will generate select + select.
This patch reduces the number of branch instructions for a specific condition:
select(C0, x, select(C1 <https://reviews.llvm.org/C1>, x, y)) -> select(C0|C1 <https://reviews.llvm.org/C1>, x, y)
select(C0, select(C1 <https://reviews.llvm.org/C1>, x, y), y) -> select(C0&C1 <https://reviews.llvm.org/C1>, x, y)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151180
Files:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/fpclamptosat.ll
llvm/test/CodeGen/RISCV/min-max.ll
llvm/test/CodeGen/RISCV/rvv/fpclamptosat_vec.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151180.524574.patch
Type: text/x-patch
Size: 49459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230523/d10b6b36/attachment-0001.bin>
More information about the llvm-commits
mailing list