[PATCH] D158879: [RISCV] Improve splatPartsI64WithVL for vlmax scalable vector constants where Hi and Lo are the same.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 12:39:23 PDT 2023


craig.topper created this revision.
craig.topper added reviewers: reames, luke.
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, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: wangpc, alextsao1999, eopXD, MaskRay.
Herald added a project: LLVM.

We can use a 32-bit splat and bitcast to i64 vector.

This only handles the case where we are using vlmax so that the new
vl is cheap to compute. This could be generalized to double the VL.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158879

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/rvv/bitreverse-sdnode.ll
  llvm/test/CodeGen/RISCV/rvv/bitreverse-vp.ll
  llvm/test/CodeGen/RISCV/rvv/ctlz-sdnode.ll
  llvm/test/CodeGen/RISCV/rvv/ctpop-sdnode.ll
  llvm/test/CodeGen/RISCV/rvv/ctpop-vp.ll
  llvm/test/CodeGen/RISCV/rvv/cttz-sdnode.ll
  llvm/test/CodeGen/RISCV/rvv/cttz-vp.ll
  llvm/test/CodeGen/RISCV/rvv/splat-vector-split-i64-vl-sdnode.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158879.553579.patch
Type: text/x-patch
Size: 214908 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230825/86fbf7b1/attachment-0001.bin>


More information about the llvm-commits mailing list