Skip to content

Commit 1fd8d3f

Browse files
authored
[mlir] Fix wrong names in LinalgOps and ScalableValueBoundsConstraintSet (#117227)
Fix for some mistakes in source code found using PVS Studio. Inspired by: https://pvs-studio.com/en/blog/posts/cpp/1188/ Fixed: - [Bug 2](https://pvs-studio.com/en/blog/posts/cpp/1188/#ID725051E718) - [Bug 3](https://pvs-studio.com/en/blog/posts/cpp/1188/#IDFA2459368E)
1 parent 026af9e commit 1fd8d3f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ class RegionBuilderHelper {
523523
isInteger(arg0) && arg0.getType().getIntOrFloatBitWidth() == 1;
524524
bool tailFloatingPoint =
525525
isFloatingPoint(arg0) && isFloatingPoint(arg1) && isFloatingPoint(arg2);
526-
bool tailInteger = isInteger(arg0) && isInteger(arg1) && isInteger(arg1);
526+
bool tailInteger = isInteger(arg0) && isInteger(arg1) && isInteger(arg2);
527527
OpBuilder::InsertionGuard g(builder);
528528
builder.setInsertionPointToEnd(&block);
529529
switch (ternaryFn) {

mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ ScalableValueBoundsConstraintSet::computeScalableBound(
107107

108108
AffineMap bound = [&] {
109109
if (boundType == BoundType::EQ && !invalidBound(lowerBound) &&
110-
lowerBound[0] == lowerBound[0]) {
110+
lowerBound[0] == upperBound[0]) {
111111
return lowerBound[0];
112112
} else if (boundType == BoundType::LB && !invalidBound(lowerBound)) {
113113
return lowerBound[0];

0 commit comments

Comments
 (0)