[Mlir-commits] [mlir] 9e65034 - [mlir] Construct SmallVector with ArrayRef (NFC) (#135899)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Apr 15 23:16:55 PDT 2025


Author: Kazu Hirata
Date: 2025-04-15T23:16:52-07:00
New Revision: 9e650349bfdcd34998c461e1441f02a79c664d38

URL: https://github.com/llvm/llvm-project/commit/9e650349bfdcd34998c461e1441f02a79c664d38
DIFF: https://github.com/llvm/llvm-project/commit/9e650349bfdcd34998c461e1441f02a79c664d38.diff

LOG: [mlir] Construct SmallVector with ArrayRef (NFC) (#135899)

Added: 
    

Modified: 
    mlir/lib/Dialect/Tosa/IR/TosaOps.cpp

Removed: 
    


################################################################################
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