[llvm] [RISCV][GlobalISel] Legalize Scalable Vector Loads and Stores (PR #84965)
Jiahan Xie via llvm-commits
llvm-commits at lists.llvm.org
Tue May 28 10:30:53 PDT 2024
jiahanxie353 wrote:
When we have alignment restrictions for `load`, we need to check `allowsMemoryAccessForAlignment`, like [what SelectionDAG did](https://github.com/llvm/llvm-project/blob/16a5fd3fdb91ffb39b97dbd3a7e9346ba406360d/llvm/lib/Target/RISCV/RISCVISelLowering.cpp#L5433). Therefore, equivalently, we can insert `customIf(!allowsMemoryAccessForAlignment)` around [here](https://github.com/llvm/llvm-project/blob/3c8423d1b2bf9ae5502ed16dde1d5c23deca5fef/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp#L257)
But to get such information, we need to have `LLVMContext`, `DataLayout`, etc. However, [`RISCVLegalizerInfo`](https://github.com/llvm/llvm-project/blob/16a5fd3fdb91ffb39b97dbd3a7e9346ba406360d/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp#L69) does not have those fields in it. Nor can I figure out a way to use `LegalityQuery` to obtain those required arguments.
Can I get some help on this? Thanks!
https://github.com/llvm/llvm-project/pull/84965
More information about the llvm-commits
mailing list