[Mlir-commits] [mlir] [mlir] Construct SmallVector with ArrayRef (NFC) (PR #135899)
Kazu Hirata
llvmlistbot at llvm.org
Tue Apr 15 20:08:41 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/135899
None
>From 8995158d2850f1949837c8e2fd92e2c3bd5113d9 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 22 Mar 2025 13:14:43 -0700
Subject: [PATCH] [mlir] Construct SmallVector with ArrayRef (NFC)
---
mlir/lib/Dialect/Tosa/IR/TosaOps.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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 '")
More information about the Mlir-commits
mailing list