From 5d4e1e0c8403db8e9bebaa4ee3cabc8d2175c8cc Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Tue, 29 Jul 2025 20:42:54 +0100 Subject: [PATCH] [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 --- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp index d4f372652a5e..4eef8de06b27 100644 --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -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 Ops; + SmallVector Ops; unsigned SrcEltSz = DL.getTypeSizeInBits(SrcTy->getScalarType()); unsigned DstEltSz = DL.getTypeSizeInBits(RetTy->getScalarType()); if (LT.second.getVectorElementType() == MVT::bf16) {