Skip to content

Commit a69645a

Browse files
committed
Move declaration to the first use as close as possible
1 parent c70508a commit a69645a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,6 @@ RISCVTTIImpl::getMinMaxReductionCost(Intrinsic::ID IID, VectorType *Ty,
13601360
return BaseT::getMinMaxReductionCost(IID, Ty, FMF, CostKind);
13611361

13621362
std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(Ty);
1363-
SmallVector<unsigned, 3> Opcodes;
13641363
if (Ty->getElementType()->isIntegerTy(1)) {
13651364
// vcpop sequences, see vreduction-mask.ll.
13661365
if ((IID == Intrinsic::umax) || (IID == Intrinsic::smin))
@@ -1371,6 +1370,7 @@ RISCVTTIImpl::getMinMaxReductionCost(Intrinsic::ID IID, VectorType *Ty,
13711370

13721371
// IR Reduction is composed by two vmv and one rvv reduction instruction.
13731372
unsigned SplitOp;
1373+
SmallVector<unsigned, 3> Opcodes;
13741374
switch (IID) {
13751375
default:
13761376
llvm_unreachable("Unsupported intrinsic");

0 commit comments

Comments
 (0)