Skip to content

Conversation

topperc
Copy link
Collaborator

@topperc topperc commented Sep 18, 2025

We're only going to modify existing items, not add or remove any elements to the vector.

…nge the contents of the vector but not its size.
@llvmbot
Copy link
Member

llvmbot commented Sep 18, 2025

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

Author: Craig Topper (topperc)

Changes

We're only going to modify exiting items, not add or remove any elements to the vector.


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

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVISelLowering.cpp (+2-2)
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index d5240f971f815..71e9bf2a7882f 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -10719,7 +10719,7 @@ static SDValue lowerCttzElts(SDNode *N, SelectionDAG &DAG,
 }
 
 static inline void promoteVCIXScalar(const SDValue &Op,
-                                     SmallVectorImpl<SDValue> &Operands,
+                                     MutableArrayRef<SDValue> Operands,
                                      SelectionDAG &DAG) {
   const RISCVSubtarget &Subtarget =
       DAG.getMachineFunction().getSubtarget<RISCVSubtarget>();
@@ -10755,7 +10755,7 @@ static inline void promoteVCIXScalar(const SDValue &Op,
 }
 
 static void processVCIXOperands(SDValue &OrigOp,
-                                SmallVectorImpl<SDValue> &Operands,
+                                MutableArrayRef<SDValue> Operands,
                                 SelectionDAG &DAG) {
   promoteVCIXScalar(OrigOp, Operands, DAG);
   const RISCVSubtarget &Subtarget =

Copy link
Member

@mshockwave mshockwave left a comment

Choose a reason for hiding this comment

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

LGTM
There is a typo in your PR description though: "exiting" -> "existing"

@topperc
Copy link
Collaborator Author

topperc commented Sep 18, 2025

LGTM There is a typo in your PR description though: "exiting" -> "existing"

Thanks. Fixed now.

Copy link
Member

@4vtomat 4vtomat left a comment

Choose a reason for hiding this comment

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

LGTM~

@topperc topperc merged commit 90d03a0 into llvm:main Sep 19, 2025
9 checks passed
@topperc topperc deleted the pr/mutablearrayref branch September 19, 2025 17:21
SeongjaeP pushed a commit to SeongjaeP/llvm-project that referenced this pull request Sep 23, 2025
…9651)

We're only going to modify existing items, not add or remove any
elements to the vector.
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.

5 participants