[Mlir-commits] [mlir] [mlir] Construct SmallVector with ArrayRef (NFC) (PR #135899)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Apr 15 20:09:20 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-tosa
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/135899.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/Tosa/IR/TosaOps.cpp (+1-2)
``````````diff
diff --git a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
index bce5b226635f3..9a1dfd8e17b85 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
@@ -483,8 +483,7 @@ LogicalResult tosa::ArgMaxOp::verify() {
const ArrayRef<int64_t> inputShape = inputType.getShape();
const ArrayRef<int64_t> outputShape = resultType.getShape();
- llvm::SmallVector<int64_t> expectedOutputShape(inputShape.begin(),
- inputShape.end());
+ llvm::SmallVector<int64_t> expectedOutputShape(inputShape);
expectedOutputShape.erase(expectedOutputShape.begin() + axis);
if (failed(verifyCompatibleShape(expectedOutputShape, outputShape)))
return emitOpError("expected output shape '")
``````````
</details>
https://github.com/llvm/llvm-project/pull/135899
More information about the Mlir-commits
mailing list