[PATCH] D129302: [RISCV] Mark vsadd(u)_vl as commutable

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 09:18:07 PDT 2022


reames created this revision.
reames added reviewers: asb, craig.topper, frasercrmck.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, 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, bollu, simoncook, johnrusso, rbar, hiraditya, arichardson, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added subscribers: alextsao1999, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

This allows fixed length vectors involving splats on the LHS to commute into the _vx form of the instruction.  Oddly, the generic canonicalization rules appear to catch the scalable vector cases.  I haven't fully dug in to understand why, but I suspect it's because of a difference in how we represent splats (splat_vector vs build_vector).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129302

Files:
  llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
  llvm/test/CodeGen/RISCV/rvv/active_lane_mask.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vsadd.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vsaddu.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129302.442946.patch
Type: text/x-patch
Size: 9565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220707/a1cd1eec/attachment.bin>


More information about the llvm-commits mailing list