[llvm] [IA] Relax the requirement of having ExtractValue users on deinterleave intrinsic (PR #148716)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 16 12:13:58 PDT 2025
================
@@ -256,17 +257,15 @@ static bool isMultipleOfN(const Value *V, const DataLayout &DL, unsigned N) {
}
bool RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(
- Instruction *Load, Value *Mask,
- ArrayRef<Value *> DeinterleaveValues) const {
- const unsigned Factor = DeinterleaveValues.size();
+ Instruction *Load, Value *Mask, IntrinsicInst *DI) const {
+ const unsigned Factor = getDeinterleaveIntrinsicFactor(DI->getIntrinsicID());
+ assert(Factor && "unexpected deinterleaving factor");
if (Factor > 8)
return false;
IRBuilder<> Builder(Load);
- Value *FirstActive =
- *llvm::find_if(DeinterleaveValues, [](Value *V) { return V != nullptr; });
- VectorType *ResVTy = cast<VectorType>(FirstActive->getType());
+ VectorType *ResVTy = cast<VectorType>(getDeinterleavedVectorType(DI));
----------------
preames wrote:
e.g. another cast
https://github.com/llvm/llvm-project/pull/148716
More information about the llvm-commits
mailing list