Skip to content

Commit cf1de0a

Browse files
committed
[RISCV] Reuse Factor variable instead of hardcoding 2 in other places. NFC
1 parent 3e65c30 commit cf1de0a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21462,7 +21462,7 @@ bool RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(
2146221462
if (DI->getIntrinsicID() != Intrinsic::vector_deinterleave2)
2146321463
return false;
2146421464

21465-
unsigned Factor = 2;
21465+
const unsigned Factor = 2;
2146621466

2146721467
VectorType *VTy = cast<VectorType>(DI->getOperand(0)->getType());
2146821468
VectorType *ResVTy = cast<VectorType>(DI->getType()->getContainedType(0));
@@ -21497,7 +21497,7 @@ bool RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(
2149721497
LI->getContext(), "riscv.vector.tuple",
2149821498
ScalableVectorType::get(Type::getInt8Ty(LI->getContext()),
2149921499
NumElts * SEW / 8),
21500-
2);
21500+
Factor);
2150121501

2150221502
VlsegNFunc = Intrinsic::getDeclaration(LI->getModule(), IntrIds[Factor - 2],
2150321503
{VecTupTy, XLenTy});
@@ -21533,7 +21533,7 @@ bool RISCVTargetLowering::lowerInterleaveIntrinsicToStore(
2153321533
if (II->getIntrinsicID() != Intrinsic::vector_interleave2)
2153421534
return false;
2153521535

21536-
unsigned Factor = 2;
21536+
const unsigned Factor = 2;
2153721537

2153821538
VectorType *VTy = cast<VectorType>(II->getType());
2153921539
VectorType *InVTy = cast<VectorType>(II->getOperand(0)->getType());
@@ -21567,7 +21567,7 @@ bool RISCVTargetLowering::lowerInterleaveIntrinsicToStore(
2156721567
SI->getContext(), "riscv.vector.tuple",
2156821568
ScalableVectorType::get(Type::getInt8Ty(SI->getContext()),
2156921569
NumElts * SEW / 8),
21570-
2);
21570+
Factor);
2157121571

2157221572
VssegNFunc = Intrinsic::getDeclaration(SI->getModule(), IntrIds[Factor - 2],
2157321573
{VecTupTy, XLenTy});

0 commit comments

Comments
 (0)