[PATCH] D149369: [RISCV] Consolidate legality checking for strided load/store [nfc]

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 11:55:19 PDT 2023


reames created this revision.
reames added reviewers: craig.topper, luke.
Herald added subscribers: jobnoorman, VincentWu, vkmr, frasercrmck, 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, asb, hiraditya, arichardson, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

Note that the strided load from concat_vector combine was using the wrong legality test.  It happened to work out as the alignment requirement is based on the scalar type either way, but unless I'm missing something allowsMisalignedAccess is expecting a contiguous memory access.

Posting for review mostly to see if anyone had a better suggestion than getting the LLVM type from the VT.  That's a bit ugly, but I didn't see a cleaner way as the element type check is in terms of Type, not MVT.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149369

Files:
  llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149369.517665.patch
Type: text/x-patch
Size: 4769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230427/73dcfda3/attachment.bin>


More information about the llvm-commits mailing list