@@ -341,34 +341,32 @@ bool RISCVTargetLowering::lowerInterleaveIntrinsicToStore(
341
341
Ops.append ({SI->getPointerOperand (), Mask, VL});
342
342
343
343
Builder.CreateCall (VssegNFunc, Ops);
344
- } else {
345
- unsigned SEW = DL.getTypeSizeInBits (InVTy->getElementType ());
346
- unsigned NumElts = InVTy->getElementCount ().getKnownMinValue ();
347
- Type *VecTupTy = TargetExtType::get (
348
- SI->getContext (), " riscv.vector.tuple" ,
349
- ScalableVectorType::get (Type::getInt8Ty (SI->getContext ()),
350
- NumElts * SEW / 8 ),
351
- Factor);
352
-
353
- Value *VL = Constant::getAllOnesValue (XLenTy);
354
- Value *Mask = Builder.getAllOnesMask (InVTy->getElementCount ());
355
-
356
- Value *StoredVal = PoisonValue::get (VecTupTy);
357
- for (unsigned i = 0 ; i < Factor; ++i)
358
- StoredVal = Builder.CreateIntrinsic (
359
- Intrinsic::riscv_tuple_insert, {VecTupTy, InVTy},
360
- {StoredVal, InterleaveValues[i], Builder.getInt32 (i)});
344
+ return true ;
345
+ }
346
+ unsigned SEW = DL.getTypeSizeInBits (InVTy->getElementType ());
347
+ unsigned NumElts = InVTy->getElementCount ().getKnownMinValue ();
348
+ Type *VecTupTy = TargetExtType::get (
349
+ SI->getContext (), " riscv.vector.tuple" ,
350
+ ScalableVectorType::get (Type::getInt8Ty (SI->getContext ()),
351
+ NumElts * SEW / 8 ),
352
+ Factor);
361
353
362
- Function *VssegNFunc = Intrinsic::getOrInsertDeclaration (
363
- SI->getModule (), ScalableVssegIntrIds[Factor - 2 ],
364
- {VecTupTy, PtrTy, Mask->getType (), VL->getType ()});
354
+ Value *VL = Constant::getAllOnesValue (XLenTy);
355
+ Value *Mask = Builder.getAllOnesMask (InVTy->getElementCount ());
365
356
366
- Value *Operands[] = {StoredVal, SI->getPointerOperand (), Mask, VL,
367
- ConstantInt::get (XLenTy, Log2_64 (SEW))};
357
+ Value *StoredVal = PoisonValue::get (VecTupTy);
358
+ for (unsigned i = 0 ; i < Factor; ++i)
359
+ StoredVal = Builder.CreateIntrinsic (
360
+ Intrinsic::riscv_tuple_insert, {VecTupTy, InVTy},
361
+ {StoredVal, InterleaveValues[i], Builder.getInt32 (i)});
368
362
369
- Builder.CreateCall (VssegNFunc, Operands);
370
- }
363
+ Function *VssegNFunc = Intrinsic::getOrInsertDeclaration (
364
+ SI->getModule (), ScalableVssegIntrIds[Factor - 2 ],
365
+ {VecTupTy, PtrTy, Mask->getType (), VL->getType ()});
371
366
367
+ Value *Operands[] = {StoredVal, SI->getPointerOperand (), Mask, VL,
368
+ ConstantInt::get (XLenTy, Log2_64 (SEW))};
369
+ Builder.CreateCall (VssegNFunc, Operands);
372
370
return true ;
373
371
}
374
372
0 commit comments