[PATCH] D157120: [RISCV] Use v(f)slide1down for build_vector with dominant values

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 10:12:04 PDT 2023


reames created this revision.
reames added reviewers: luke, craig.topper, asb, frasercrmck, kito-cheng, fakepaper56, 4vtomat.
Herald added subscribers: jobnoorman, VincentWu, vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, 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.

If we have a dominant value, we can still use a v(f)slide1down to handle the last value in the vector if that value is neither undef nor the dominant value.

Note that we can extend this idea to any tail of elements, but that's ends up being a near complete merge of the v(f)slide1down insert path, and requires a bit more untangling on profitability heuristics first.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157120

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-buildvec.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-shuffles.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157120.547268.patch
Type: text/x-patch
Size: 7534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230804/86083edc/attachment.bin>


More information about the llvm-commits mailing list