[Mlir-commits] [mlir] bf62a4b - Apply clang-tidy fixes for performance-move-const-arg in ArithmeticOps.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Mon Apr 11 21:40:32 PDT 2022
Author: Mehdi Amini
Date: 2022-04-12T04:39:57Z
New Revision: bf62a4b9c580ddc55b2ce602e92537338cd48715
URL: https://github.com/llvm/llvm-project/commit/bf62a4b9c580ddc55b2ce602e92537338cd48715
DIFF: https://github.com/llvm/llvm-project/commit/bf62a4b9c580ddc55b2ce602e92537338cd48715.diff
LOG: Apply clang-tidy fixes for performance-move-const-arg in ArithmeticOps.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
index edfdda82d9552..50ff5581c216c 100644
--- a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
+++ b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
@@ -1869,7 +1869,7 @@ OpFoldResult arith::ShLIOp::fold(ArrayRef<Attribute> operands) {
auto result = constFoldBinaryOp<IntegerAttr>(
operands, [&](const APInt &a, const APInt &b) {
bounded = b.ule(b.getBitWidth());
- return std::move(a).shl(b);
+ return a.shl(b);
});
return bounded ? result : Attribute();
}
@@ -1884,7 +1884,7 @@ OpFoldResult arith::ShRUIOp::fold(ArrayRef<Attribute> operands) {
auto result = constFoldBinaryOp<IntegerAttr>(
operands, [&](const APInt &a, const APInt &b) {
bounded = b.ule(b.getBitWidth());
- return std::move(a).lshr(b);
+ return a.lshr(b);
});
return bounded ? result : Attribute();
}
@@ -1899,7 +1899,7 @@ OpFoldResult arith::ShRSIOp::fold(ArrayRef<Attribute> operands) {
auto result = constFoldBinaryOp<IntegerAttr>(
operands, [&](const APInt &a, const APInt &b) {
bounded = b.ule(b.getBitWidth());
- return std::move(a).ashr(b);
+ return a.ashr(b);
});
return bounded ? result : Attribute();
}
More information about the Mlir-commits
mailing list