@@ -72,3 +72,63 @@ func.func @arm_sve_psel_bad_vector_type(%a : vector<[7]xi1>, %index: index) {
7272 arm_sve.psel %a , %a [%index ] : vector <[7 ]xi1 >, vector <[7 ]xi1 >
7373 return
7474}
75+
76+ // -----
77+
78+ func.func @bfmmla_invalid_element_type_lhs_rhs (%acc: vector <[4 ]xf32 >,
79+ %lhs: vector <[8 ]xf16 >,
80+ %rhs: vector <[8 ]xf16 >) -> vector <[4 ]xf32 > {
81+ // expected-error@+1 {{operand #1 must be scalable vector of bfloat16 type values of length 8, but got 'vector<[8]xf16>'}}
82+ %0 = arm_sve.intr.bfmmla %acc , %lhs , %rhs : vector <[8 ]xf16 > to vector <[4 ]xf32 >
83+ return %0 : vector <[4 ]xf32 >
84+ }
85+
86+ // -----
87+
88+ func.func @bfmmla_invalid_dimension_lhs_rhs (%acc: vector <[4 ]xf32 >,
89+ %lhs: vector <[4 ]xbf16 >,
90+ %rhs: vector <[4 ]xbf16 >) -> vector <[4 ]xf32 > {
91+ // expected-error@+1 {{operand #1 must be scalable vector of bfloat16 type values of length 8, but got 'vector<[4]xbf16>}}
92+ %0 = arm_sve.intr.bfmmla %acc , %lhs , %rhs : vector <[4 ]xbf16 > to vector <[4 ]xf32 >
93+ return %0 : vector <[4 ]xf32 >
94+ }
95+
96+ // -----
97+
98+ func.func @bfmmla_fixed_dimension_lhs_rhs (%acc: vector <[4 ]xf32 >,
99+ %lhs: vector <8 xbf16 >,
100+ %rhs: vector <8 xbf16 >) -> vector <[4 ]xf32 > {
101+ // expected-error@+1 {{operand #1 must be scalable vector of bfloat16 type values of length 8, but got 'vector<8xbf16>}}
102+ %0 = arm_sve.intr.bfmmla %acc , %lhs , %rhs : vector <8 xbf16 > to vector <[4 ]xf32 >
103+ return %0 : vector <[4 ]xf32 >
104+ }
105+
106+ // -----
107+
108+ func.func @bfmmla_invalid_element_type_acc (%acc: vector <[4 ]xi32 >,
109+ %lhs: vector <[8 ]xbf16 >,
110+ %rhs: vector <[8 ]xbf16 >) -> vector <[4 ]xi32 > {
111+ // expected-error@+1 {{operand #0 must be scalable vector of 32-bit float values of length 4, but got 'vector<[4]xi32>'}}
112+ %0 = arm_sve.intr.bfmmla %acc , %lhs , %rhs : vector <[8 ]xbf16 > to vector <[4 ]xi32 >
113+ return %0 : vector <[4 ]xi32 >
114+ }
115+
116+ // -----
117+
118+ func.func @bfmmla_invalid_dimension_acc (%acc: vector <[8 ]xf32 >,
119+ %lhs: vector <[8 ]xbf16 >,
120+ %rhs: vector <[8 ]xbf16 >) -> vector <[8 ]xf32 > {
121+ // expected-error@+1 {{operand #0 must be scalable vector of 32-bit float values of length 4, but got 'vector<[8]xf32>'}}
122+ %0 = arm_sve.intr.bfmmla %acc , %lhs , %rhs : vector <[8 ]xbf16 > to vector <[8 ]xf32 >
123+ return %0 : vector <[8 ]xf32 >
124+ }
125+
126+ // -----
127+
128+ func.func @bfmmla_fixed_dimension_acc (%acc: vector <4 xf32 >,
129+ %lhs: vector <[8 ]xbf16 >,
130+ %rhs: vector <[8 ]xbf16 >) -> vector <4 xf32 > {
131+ // expected-error@+1 {{operand #0 must be scalable vector of 32-bit float values of length 4, but got 'vector<4xf32>'}}
132+ %0 = arm_sve.intr.bfmmla %acc , %lhs , %rhs : vector <[8 ]xbf16 > to vector <4 xf32 >
133+ return %0 : vector <4 xf32 >
134+ }
0 commit comments