[Mlir-commits] [mlir] e0b83ca - [MLIR][ArmNeon] Add a couple of negative tests for BFMMLA with scalable dimensions (#145882)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Jun 26 09:10:03 PDT 2025


Author: Momchil Velikov
Date: 2025-06-26T17:09:59+01:00
New Revision: e0b83ca8a40958045280c46d4c3e1cbd6fe511b6

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

LOG: [MLIR][ArmNeon] Add a couple of negative tests for BFMMLA with scalable dimensions (#145882)

Added: 
    

Modified: 
    mlir/test/Dialect/ArmNeon/invalid.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/test/Dialect/ArmNeon/invalid.mlir b/mlir/test/Dialect/ArmNeon/invalid.mlir
index 989293a3508b4..00d489b639191 100644
--- a/mlir/test/Dialect/ArmNeon/invalid.mlir
+++ b/mlir/test/Dialect/ArmNeon/invalid.mlir
@@ -114,6 +114,16 @@ func.func @bfmmla_invalid_dimension_lhs_rhs(%acc: vector<4xf32>,
 
 // -----
 
+func.func @bfmmla_scalable_dimension_lhs_rhs(%acc: vector<4xf32>,
+                                             %lhs: vector<[8]xbf16>,
+                                             %rhs: vector<[8]xbf16>) -> vector<4xf32> {
+  // expected-error at +1 {{operand #1 must be a vector with length 8 of bfloat16 type values, but got 'vector<[8]xbf16>'}}
+  %0 = arm_neon.intr.bfmmla %acc, %lhs, %rhs : vector<[8]xbf16> to vector<4xf32>
+  return %0 : vector<4xf32>
+}
+
+// -----
+
 func.func @bfmmla_invalid_element_type_acc(%acc: vector<4xi32>,
                                            %lhs: vector<8xbf16>,
                                            %rhs: vector<8xbf16>) -> vector<4xi32> {
@@ -131,3 +141,13 @@ func.func @bfmmla_invalid_dimension_acc(%acc: vector<8xf32>,
   %0 = arm_neon.intr.bfmmla %acc, %lhs, %rhs : vector<8xbf16> to vector<8xf32>
   return %0 : vector<8xf32>
 }
+
+// -----
+
+func.func @bfmmla_scalable_dimension_acc(%acc: vector<[4]xf32>,
+                                         %lhs: vector<8xbf16>,
+                                         %rhs: vector<8xbf16>) -> vector<[4]xf32> {
+  // expected-error at +1 {{op operand #0 must be a vector with length 4 of 32-bit float values, but got 'vector<[4]xf32>'}}
+  %0 = arm_neon.intr.bfmmla %acc, %lhs, %rhs : vector<8xbf16> to vector<[4]xf32>
+  return %0 : vector<[4]xf32>
+}


        


More information about the Mlir-commits mailing list