[llvm] [RISCV][llvm] Handle `ptr` element type in `lowerDeinterleaveIntrinsicToLoad` and `lowerInterleaveIntrinsicToStore` (PR #107079)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 03:44:57 PDT 2024
================
@@ -21951,7 +21951,9 @@ bool RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(
Intrinsic::riscv_vlseg6, Intrinsic::riscv_vlseg7,
Intrinsic::riscv_vlseg8};
- unsigned SEW = ResVTy->getElementType()->getScalarSizeInBits();
+ unsigned SEW = ResVTy->getElementType()->isPointerTy()
+ ? Subtarget.getXLen()
+ : ResVTy->getElementType()->getScalarSizeInBits();
----------------
lukel97 wrote:
Can we use DataLayout instead of hardcoding XLEN?
```suggestion
unsigned SEW = DI->getDataLayout().getTypeSizeInBits(ResVTy->getElementType());
```
https://github.com/llvm/llvm-project/pull/107079
More information about the llvm-commits
mailing list