[PATCH] D128500: [RISCV] Change how we isel (add X, [-4096, -2049]) or (add X, [2048,4095]).
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 00:26:42 PDT 2022
craig.topper created this revision.
craig.topper added reviewers: reames, frasercrmck, asb, jrtc27, luismarques.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
We currently split the immediate almost equally between two addis.
If the immediate is odd, it won't be split exactly equal.
This patch instead gives one addi an immediate of 2047 or -2048 and the
other getsthe remainder. If the original immediate is near -2049 or 2048,
this might allow the use of c.addi for the addi that receives the
smaller immediate.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128500
Files:
llvm/lib/Target/RISCV/RISCVInstrInfo.td
llvm/test/CodeGen/RISCV/add-imm.ll
llvm/test/CodeGen/RISCV/addimm-mulimm.ll
llvm/test/CodeGen/RISCV/xaluo.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128500.439653.patch
Type: text/x-patch
Size: 9972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220624/8f0be555/attachment.bin>
More information about the llvm-commits
mailing list