[llvm] [RISCV][GlobalISel] Legalize Scalable Vector Loads and Stores (PR #84965)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 16:29:49 PDT 2024
================
@@ -3690,7 +3690,7 @@ LegalizerHelper::LegalizeResult LegalizerHelper::lowerLoad(GAnyLoad &LoadMI) {
if (!isPowerOf2_32(MemSizeInBits)) {
// This load needs splitting into power of 2 sized loads.
- LargeSplitSize = llvm::bit_floor(MemSizeInBits);
+ LargeSplitSize = llvm::bit_floor(MemSizeInBits.getKnownMinValue());
----------------
michaelmaitland wrote:
These values are used in the call to getMachineMemOperand. There is a signature:
```
MachineMemOperand *MachineFunction::getMachineMemOperand(
const MachineMemOperand *MMO, const MachinePointerInfo &PtrInfo, LLT Ty)
```
It might be safer to create a scalable MMO using `Ty` rather than forcing it into fixed.
Ditto for the other instructions that are built with `LargeSplitSize` and `SmallSplitSize`.
https://github.com/llvm/llvm-project/pull/84965
More information about the llvm-commits
mailing list