[PATCH] D157886: [RISCV] Match strided loads with reversed indexing sequences
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 08:25:56 PDT 2023
reames created this revision.
reames added reviewers: luke, craig.topper, kito-cheng, frasercrmck, asb, pcwang-thead, fakepaper56.
Herald added subscribers: jobnoorman, VincentWu, vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, arphaman, 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 reviewer: wangpc.
Herald added a project: LLVM.
This extends the concat_vector of loads to strided_load transform to handle reversed index pattern. The previous code expected indexing of the form (a0, a1+S, a2+S,...). However, we can also see indexing of the form (a1+S, a2+S, a3+S, .., aS). This form is a strided load starting at address aN + S*(n-1) with stride -S.
Note that this is also fixing what looks to be a bug in the memory location reasoning for forward strided case. A strided load with negative stride access eltsize bytes past base ptr, and then bytes *before* base ptr. (That is, the range should extend from before base ptr to after base ptr.)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D157886
Files:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-strided-load-combine.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157886.549954.patch
Type: text/x-patch
Size: 7770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230814/010580a2/attachment.bin>
More information about the llvm-commits
mailing list