[llvm] [RISCV][llvm] Handle `ptr` element type in `lowerDeinterleaveIntrinsicToLoad` and `lowerInterleaveIntrinsicToStore` (PR #107079)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 10:26:25 PDT 2024


================
@@ -21951,7 +21951,8 @@ bool RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(
         Intrinsic::riscv_vlseg6, Intrinsic::riscv_vlseg7,
         Intrinsic::riscv_vlseg8};
 
-    unsigned SEW = ResVTy->getElementType()->getScalarSizeInBits();
+    unsigned SEW =
+        DI->getDataLayout().getTypeSizeInBits(ResVTy->getElementType());
----------------
topperc wrote:

Can we save the DataLayout in a variable? We used it earlier for the `isLegalInterleavedAccessType` check.

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


More information about the llvm-commits mailing list