[PATCH] D140053: [RISCV] Add support for predication AND/OR/XOR/ADD/SUB with short-forward-branch-opt.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 13:55:49 PST 2022


craig.topper created this revision.
craig.topper added reviewers: reames, asb, luismarques, jrtc27, kito-cheng.
Herald added subscribers: sunshaoce, VincentWu, StephenFan, vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, kristof.beyls, 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.

sifive-7-series can predicate ALU instructions in the shadow of a
branch not just move instruction instructions.

This patch implements analyzeSelect/optimizeSelect to predicate
these operations. This is based on ARM's implementation.

I've restricted it to just the instructions we have test cases for,
but it can be extended in the future.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140053

Files:
  llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
  llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
  llvm/lib/Target/RISCV/RISCVInstrInfo.h
  llvm/lib/Target/RISCV/RISCVInstrInfo.td
  llvm/test/CodeGen/RISCV/select-binop-identity.ll
  llvm/test/CodeGen/RISCV/short-foward-branch-opt.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140053.482985.patch
Type: text/x-patch
Size: 18710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221214/cf6aba63/attachment.bin>


More information about the llvm-commits mailing list