[Mlir-commits] [mlir] [mlir] Avoid else after return in ScalableValueBounds (NFC) (PR #169211)

Benjamin Maxwell llvmlistbot at llvm.org
Sun Nov 23 03:17:34 PST 2025


https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/169211

None

>From 77a50e92f0626a8aae3181df4c7a5596a927642f Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell <macdue at dueutil.tech>
Date: Sun, 23 Nov 2025 11:16:13 +0000
Subject: [PATCH] [mlir] Avoid else after return in ScalableValueBounds (NFC)

---
 .../Vector/IR/ScalableValueBoundsConstraintSet.cpp        | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp b/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp
index a26edac98ea8d..2986f4c2d607d 100644
--- a/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp
+++ b/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp
@@ -106,14 +106,12 @@ ScalableValueBoundsConstraintSet::computeScalableBound(
 
   AffineMap bound = [&] {
     if (boundType == BoundType::EQ && !invalidBound(lowerBound) &&
-        lowerBound[0] == upperBound[0]) {
+        lowerBound[0] == upperBound[0])
       return lowerBound[0];
-    }
-    if (boundType == BoundType::LB && !invalidBound(lowerBound)) {
+    if (boundType == BoundType::LB && !invalidBound(lowerBound))
       return lowerBound[0];
-    } else if (boundType == BoundType::UB && !invalidBound(upperBound)) {
+    if (boundType == BoundType::UB && !invalidBound(upperBound))
       return upperBound[0];
-    }
     return AffineMap{};
   }();
 



More information about the Mlir-commits mailing list