[RISCV] Consolidate legality checking for strided load/store [nfc]
authorPhilip Reames <preames@rivosinc.com>
Fri, 28 Apr 2023 15:07:28 +0000 (08:07 -0700)
committerPhilip Reames <listmail@philipreames.com>
Fri, 28 Apr 2023 15:13:03 +0000 (08:13 -0700)
commit37cf4fc6cef9f2f50e15622a1bdecc89ea6ddd23
treeb27801bde27d07bef82c975bae1f9216f46f7167
parent4c2d29f2fc78782a469ccff625dd29d66d4d9f9b
[RISCV] Consolidate legality checking for strided load/store [nfc]

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.

Differential Revision: https://reviews.llvm.org/D149369
llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h