[Mlir-commits] [mlir] ff9a490 - [mlir][ArmSVE][NFC] Remove redundant scalability checks in contract lowering (#233868)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Oct 20 08:02:30 PDT 2026


Author: Andrzej WarzyƄski
Date: 2026-10-20T15:02:24Z
New Revision: ff9a4905f76222d618faf21745012752a2888ae0

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

LOG: [mlir][ArmSVE][NFC] Remove redundant scalability checks in contract lowering (#233868)

Replace
```cpp
if ( ... || !rhsType.getScalableDims()[0]) ...
  !rhsType.getScalableDims()[0])
```
with
```cpp
if ( ... || !rhsType.getScalableDims()[0]) ... )
```

Added: 
    

Modified: 
    mlir/lib/Dialect/ArmSVE/Transforms/LowerContractToSVEPatterns.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/ArmSVE/Transforms/LowerContractToSVEPatterns.cpp b/mlir/lib/Dialect/ArmSVE/Transforms/LowerContractToSVEPatterns.cpp
index 86fd0bf2661ed4..1c82297a9e0c0f 100644
--- a/mlir/lib/Dialect/ArmSVE/Transforms/LowerContractToSVEPatterns.cpp
+++ b/mlir/lib/Dialect/ArmSVE/Transforms/LowerContractToSVEPatterns.cpp
@@ -444,8 +444,7 @@ class VectorContractRewriterI8MM : public VectorContractRewriter {
     //  * M and N even and at least 2
     if (lhsType.isScalable() || !rhsType.getScalableDims()[0] ||
         rhsType.getScalableDims()[1] || lhsType.getDimSize(1) != k || k != 8 ||
-        m < 2 || m % 2 != 0 || n < 2 || n % 2 != 0 ||
-        !rhsType.getScalableDims()[0])
+        m < 2 || m % 2 != 0 || n < 2 || n % 2 != 0)
       return rewriter.notifyMatchFailure(op, "non-matching operand shape");
 
     // Check the output is a vector of i32 elements.
@@ -516,8 +515,7 @@ class VectorContractRewriterBfloat : public VectorContractRewriter {
     //  * M and N even and at least 2
     if (lhsType.isScalable() || !rhsType.getScalableDims()[0] ||
         rhsType.getScalableDims()[1] || lhsType.getDimSize(1) != k || k != 4 ||
-        m < 2 || m % 2 != 0 || n < 2 || n % 2 != 0 ||
-        !rhsType.getScalableDims()[0])
+        m < 2 || m % 2 != 0 || n < 2 || n % 2 != 0)
       return rewriter.notifyMatchFailure(op, "non-matching operand shape");
 
     // Check the output is a vector of Float32 elements.


        


More information about the Mlir-commits mailing list