Apply clang-tidy fixes for performance-move-const-arg in ArithmeticOps.cpp (NFC)

This commit is contained in:
Mehdi Amini 2022-04-03 22:42:23 +00:00
parent 56245cc18c
commit bf62a4b9c5
1 changed files with 3 additions and 3 deletions

View File

@ -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();
}