[RISCV] Fix build failure in getIntrinsicInstrCost (#151210)

bd66fd0 ([CostModel/RISCV] Fix costs of vector [l](lrint|lround))
introduced buildbot failures by using a temporary ArrayRef when a
SmallVector should have been used. Fix this.

Failure: https://lab.llvm.org/buildbot/#/builders/186/builds/11133
This commit is contained in:
Ramkumar Ramachandra 2025-07-29 20:42:54 +01:00 committed by GitHub
parent 55f9eccee9
commit 5d4e1e0c84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1254,7 +1254,7 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
Type *SrcTy = ICA.getArgTypes().front();
auto SrcLT = getTypeLegalizationCost(SrcTy);
if (ST->hasVInstructions() && LT.second.isVector()) {
ArrayRef<unsigned> Ops;
SmallVector<unsigned, 2> Ops;
unsigned SrcEltSz = DL.getTypeSizeInBits(SrcTy->getScalarType());
unsigned DstEltSz = DL.getTypeSizeInBits(RetTy->getScalarType());
if (LT.second.getVectorElementType() == MVT::bf16) {