[PATCH] D155101: [RISCV] Fold ops into vmv.v.v as vmerge with all-ones mask
Luke Lau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 10:19:27 PDT 2023
luke created this revision.
luke added reviewers: reames, craig.topper, fakepaper56, frasercrmck.
Herald added subscribers: jobnoorman, asb, pmatos, VincentWu, vkmr, 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, wangpc, eopXD, MaskRay.
Herald added a project: LLVM.
A vmv.v.v shares the same encoding as a vmerge that isn't masked, so we can
also fold it into its operands if we treat it as a vmerge with an all-ones
mask. We take care here not to actually transform the existing vmv into a
vmerge, otherwise things like True.hasOneUse() become inaccurate. Instead this
just returns an equivalent list of operands.
This is an alternative to D153351 <https://reviews.llvm.org/D153351>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155101
Files:
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/test/CodeGen/RISCV/rvv/combine-vmv.ll
llvm/test/CodeGen/RISCV/rvv/extract-subvector.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert-subvector-shuffle.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155101.539626.patch
Type: text/x-patch
Size: 11749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230712/824bbc28/attachment.bin>
More information about the llvm-commits
mailing list