@@ -91,3 +91,43 @@ func.func @usmmla_invalid_dimensions(%a: vector<8xi32>,
9191 %0 = arm_neon.intr.usmmla %a , %b , %c : vector <32 xi8 > to vector <8 xi32 >
9292 return %0 : vector <8 xi32 >
9393}
94+
95+ // -----
96+
97+ func.func @bfmmla_invalid_element_type_lhs_rhs (%acc: vector <4 xf32 >,
98+ %lhs: vector <8 xf16 >,
99+ %rhs: vector <8 xf16 >) -> vector <4 xf32 > {
100+ // expected-error@+1 {{operand #1 must be a vector with length 8 of bfloat16 type values, but got 'vector<8xf16>'}}
101+ %0 = arm_neon.intr.bfmmla %acc , %lhs , %rhs : vector <8 xf16 > to vector <4 xf32 >
102+ return %0 : vector <4 xf32 >
103+ }
104+
105+ // -----
106+
107+ func.func @bfmmla_invalid_dimension_lhs_rhs (%acc: vector <4 xf32 >,
108+ %lhs: vector <4 xbf16 >,
109+ %rhs: vector <4 xbf16 >) -> vector <4 xf32 > {
110+ // expected-error@+1 {{operand #1 must be a vector with length 8 of bfloat16 type values, but got 'vector<4xbf16>'}}
111+ %0 = arm_neon.intr.bfmmla %acc , %lhs , %rhs : vector <4 xbf16 > to vector <4 xf32 >
112+ return %0 : vector <4 xf32 >
113+ }
114+
115+ // -----
116+
117+ func.func @bfmmla_invalid_element_type_acc (%acc: vector <4 xi32 >,
118+ %lhs: vector <8 xbf16 >,
119+ %rhs: vector <8 xbf16 >) -> vector <4 xi32 > {
120+ // expected-error@+1 {{op operand #0 must be a vector with length 4 of 32-bit float values, but got 'vector<4xi32>'}}
121+ %0 = arm_neon.intr.bfmmla %acc , %lhs , %rhs : vector <8 xbf16 > to vector <4 xi32 >
122+ return %0 : vector <4 xi32 >
123+ }
124+
125+ // -----
126+
127+ func.func @bfmmla_invalid_dimension_acc (%acc: vector <8 xf32 >,
128+ %lhs: vector <8 xbf16 >,
129+ %rhs: vector <8 xbf16 >) -> vector <8 xf32 > {
130+ // expected-error@+1 {{op operand #0 must be a vector with length 4 of 32-bit float values, but got 'vector<8xf32>'}}
131+ %0 = arm_neon.intr.bfmmla %acc , %lhs , %rhs : vector <8 xbf16 > to vector <8 xf32 >
132+ return %0 : vector <8 xf32 >
133+ }
0 commit comments