Skip to content

Commit 0210fc9

Browse files
committed
Address comments.
1 parent 2c740fb commit 0210fc9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,12 +1570,10 @@ InstructionCost
15701570
RISCVTTIImpl::getAddressComputationCost(Type *PtrTy, ScalarEvolution *SE,
15711571
const SCEV *Ptr,
15721572
TTI::TargetCostKind CostKind) const {
1573-
// Address computations with vector type are usually for indexed load/store
1574-
// which is likely more expensive.
1573+
// Address computations for vector indexed load/store likely require an offset
1574+
// and/or scaling.
15751575
if (ST->hasVInstructions() && PtrTy->isVectorTy())
1576-
return getArithmeticInstrCost(Instruction::Add, PtrTy, CostKind,
1577-
{TTI::OK_AnyValue, TTI::OP_None},
1578-
{TTI::OK_AnyValue, TTI::OP_None}, {});
1576+
return getArithmeticInstrCost(Instruction::Add, PtrTy, CostKind);
15791577

15801578
return BaseT::getAddressComputationCost(PtrTy, SE, Ptr, CostKind);
15811579
}

0 commit comments

Comments
 (0)