[PATCH] D99637: [RISCV] Add isel patterns to select vsub_vx intrinsic to vadd.vi if the immediate is small enough.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 21:51:00 PDT 2021


craig.topper created this revision.
craig.topper added reviewers: khchen, HsiangKai, frasercrmck, evandro, arcbbb.
Herald added subscribers: StephenFan, vkmr, 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, asb.
craig.topper requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLVM.

Also modify the simm5_plus1 check because Imm-1 is UB if Imm happens
to be INT64_MIN. I don't think the compiler would optimize based on that in this
usage, but it could fail UBSan or -fwrapv.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99637

Files:
  llvm/test/CodeGen/RISCV/rvv/vsub-rv32.ll
  llvm/test/CodeGen/RISCV/rvv/vsub-rv64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99637.334340.patch
Type: text/x-patch
Size: 43254 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210331/94dc26f0/attachment-0001.bin>


More information about the llvm-commits mailing list