[PATCH] D158622: [RISCV] Cost slide in insertelement/extractelement as linear in LMUL
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 23 07:44:33 PDT 2023
reames created this revision.
reames added reviewers: craig.topper, luke, asb.
Herald added subscribers: jobnoorman, sunshaoce, VincentWu, 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, bollu, simoncook, johnrusso, rbar, hiraditya, arichardson, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added subscribers: wangpc, eopXD, MaskRay.
Herald added a project: LLVM.
We had been costing the slide as if it were fixed cost, regardless of LMUL. This results in significant under-costing of high LMUL inserts and extracts.
Note that the result of this patch is actually an over cost. After my recent D158460 <https://reviews.llvm.org/D158460>, we really should be using index when known to adjust the cost. I'm deferring that to a separate change as there's an analogous change to be made on the insertelement side first.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158622
Files:
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/RISCV/fp-sqrt-pow.ll
llvm/test/Analysis/CostModel/RISCV/fp-trig-log-exp.ll
llvm/test/Analysis/CostModel/RISCV/int-sat-math.ll
llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll
llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158622.552710.patch
Type: text/x-patch
Size: 257259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230823/889ea0c4/attachment-0001.bin>
More information about the llvm-commits
mailing list