Skip to content

[RISCV] Fix build failure in getIntrinsicInstrCost #151210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 29, 2025

Conversation

artagnon
Copy link
Contributor

@artagnon artagnon commented Jul 29, 2025

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

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
@llvmbot
Copy link
Member

llvmbot commented Jul 29, 2025

@llvm/pr-subscribers-backend-risc-v

Author: Ramkumar Ramachandra (artagnon)

Changes

bd66fd0 ([CostModel/RISCV] Fix costs of vector l) 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


Full diff: https://github.com/llvm/llvm-project/pull/151210.diff

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp (+1-1)
diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
index d4f372652a5e4..bb78452585c19 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<unsigned> Ops;
+      SmallVector<unsigned> Ops;
       unsigned SrcEltSz = DL.getTypeSizeInBits(SrcTy->getScalarType());
       unsigned DstEltSz = DL.getTypeSizeInBits(RetTy->getScalarType());
       if (LT.second.getVectorElementType() == MVT::bf16) {

Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@artagnon artagnon merged commit 5d4e1e0 into llvm:main Jul 29, 2025
9 checks passed
@artagnon artagnon deleted the cm-rv-lrint-arrayref-fix branch July 29, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants