[PATCH] D149169: [RISCV] Cost constant materialization of vectors in phis

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 10:22:43 PDT 2023


luke created this revision.
luke added reviewers: ABataev, RKSimon, craig.topper, reames.
Herald added subscribers: jobnoorman, asb, pmatos, VincentWu, vkmr, frasercrmck, evandro, 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.
luke requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

If a phi has a constant operand it will need to be materialized at some
point, so account for this cost by reusing the logic used for store
immediates.
This should eventually be improved to also handle scalar constants.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149169

Files:
  llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
  llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
  llvm/test/Analysis/CostModel/RISCV/rvv-phi-const.ll
  llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149169.516840.patch
Type: text/x-patch
Size: 9164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230425/cc28b0e9/attachment-0001.bin>


More information about the llvm-commits mailing list