[llvm] [RISCV][GlobalISel] Legalize Scalable Vector Loads (PR #84965)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 25 09:48:01 PDT 2024


================
@@ -3330,8 +3330,12 @@ LegalizerHelper::LegalizeResult LegalizerHelper::lowerLoad(GAnyLoad &LoadMI) {
   LLT MemTy = MMO.getMemoryType();
   MachineFunction &MF = MIRBuilder.getMF();
 
-  unsigned MemSizeInBits = MemTy.getSizeInBits();
-  unsigned MemStoreSizeInBits = 8 * MemTy.getSizeInBytes();
+  unsigned MemSizeInBits = MemTy.isScalable()
----------------
topperc wrote:

Shouldn't these be using TypeSize instead of `unsigned`? Then you don't need to call getKnownMinValue.

https://github.com/llvm/llvm-project/pull/84965


More information about the llvm-commits mailing list