@@ -394,7 +394,7 @@ llvm.func @array_attribute_two_different_types() -> !llvm.struct<(f64, f64)> {
394394// -----
395395
396396llvm.func @struct_wrong_attribute_type () -> !llvm.struct <(f64 , f64 )> {
397- // expected-error @+1 {{expected array attribute}}
397+ // expected-error @+1 {{expected array attribute for struct type }}
398398 %0 = llvm.mlir.constant (1.0 : f64 ) : !llvm.struct <(f64 , f64 )>
399399 llvm.return %0 : !llvm.struct <(f64 , f64 )>
400400}
@@ -443,15 +443,15 @@ llvm.func @scalable_vec_requires_splat() -> vector<[4]xf64> {
443443// -----
444444
445445llvm.func @int_attr_requires_int_type () -> f32 {
446- // expected-error @+1 {{expected integer type}}
446+ // expected-error @below {{expected integer type}}
447447 %0 = llvm.mlir.constant (1 : index ) : f32
448448 llvm.return %0 : f32
449449}
450450
451451// -----
452452
453453llvm.func @vector_int_attr_requires_int_type () -> vector <2 xf32 > {
454- // expected-error @+1 {{expected integer element type}}
454+ // expected-error @below {{expected integer element type}}
455455 %0 = llvm.mlir.constant (dense <[1 , 2 ]> : vector <2 xi32 >) : vector <2 xf32 >
456456 llvm.return %0 : vector <2 xf32 >
457457}
@@ -498,15 +498,23 @@ llvm.func @vector_with_non_vector_type() -> f32 {
498498
499499// -----
500500
501- llvm.func @non_array_attr_for_struct () -> !llvm.array <2 x array <2 x array <2 x struct <(i32 )>>>> {
501+ llvm.func @array_attr_with_invalid_type () -> i32 {
502+ // expected-error @below{{expected array or struct type for array attribute}}
503+ %0 = llvm.mlir.constant ([1 : i32 ]) : i32
504+ llvm.return %0 : i32
505+ }
506+
507+ // -----
508+
509+ llvm.func @elements_attribute_incompatible_nested_array_struct1_type () -> !llvm.array <2 x array <2 x array <2 x struct <(i32 )>>>> {
502510 // expected-error @below{{expected integer element type for integer elements attribute}}
503511 %0 = llvm.mlir.constant (dense <[[[1 , 2 ], [3 , 4 ]], [[42 , 43 ], [44 , 45 ]]]> : tensor <2 x2 x2 xi32 >) : !llvm.array <2 x array <2 x array <2 x struct <(i32 )>>>>
504512 llvm.return %0 : !llvm.array <2 x array <2 x array <2 x struct <(i32 )>>>>
505513}
506514
507515// -----
508516
509- llvm.func @non_array_attr_for_struct () -> !llvm.array <2 x array <2 x array <2 x struct <(i32 , i32 , i32 )>>>> {
517+ llvm.func @elements_attribute_incompatible_nested_array_struct3_type () -> !llvm.array <2 x array <2 x array <2 x struct <(i32 , i32 , i32 )>>>> {
510518 // expected-error @below{{expected integer element type for integer elements attribute}}
511519 %0 = llvm.mlir.constant (dense <[[[1 , 2 ], [3 , 4 ]], [[42 , 43 ], [44 , 45 ]]]> : tensor <2 x2 x2 xi32 >) : !llvm.array <2 x array <2 x array <2 x struct <(i32 , i32 , i32 )>>>>
512520 llvm.return %0 : !llvm.array <2 x array <2 x array <2 x struct <(i32 , i32 , i32 )>>>>
@@ -538,8 +546,6 @@ llvm.func @struct_wrong_attribute_element_type() -> !llvm.struct<(f64, f64)> {
538546
539547// -----
540548
541- // -----
542-
543549func.func @insertvalue_non_llvm_type (%a : i32 , %b : i32 ) {
544550 // expected-error@+2 {{expected LLVM IR Dialect type}}
545551 llvm.insertvalue %a , %b [0 ] : tensor <*xi32 >
@@ -583,13 +589,13 @@ func.func @extractvalue_invalid_type(%a : !llvm.array<4 x vector<8xf32>>) -> !ll
583589 return %b : !llvm.array <4 x vector <8 xf32 >>
584590}
585591
586-
587592// -----
588593
589594func.func @extractvalue_non_llvm_type (%a : i32 , %b : tensor <*xi32 >) {
590595 // expected-error@+2 {{expected LLVM IR Dialect type}}
591596 llvm.extractvalue %b [0 ] : tensor <*xi32 >
592597}
598+
593599// -----
594600
595601func.func @extractvalue_struct_out_of_bounds () {
@@ -758,6 +764,7 @@ func.func @atomicrmw_scalable_vector(%ptr : !llvm.ptr, %f32_vec : vector<[2]xf32
758764 %0 = llvm.atomicrmw fadd %ptr , %f32_vec unordered : !llvm.ptr , vector <[2 ]xf32 >
759765 llvm.return
760766}
767+
761768// -----
762769
763770func.func @atomicrmw_vector_expected_float (%ptr : !llvm.ptr , %i32_vec : vector <3 xi32 >) {
@@ -1766,7 +1773,6 @@ func.func @tma_load(%tmaDescriptor: !llvm.ptr, %dest : !llvm.ptr<3>, %barrier: !
17661773 return
17671774}
17681775
1769-
17701776// -----
17711777
17721778func.func @tma_load (%tmaDescriptor: !llvm.ptr , %dest : !llvm.ptr <3 >, %barrier: !llvm.ptr <3 >, %crd0: i32 , %crd1: i32 , %crd2: i32 , %crd3: i32 , %off0: i16 , %off1: i16 , %ctamask : i16 , %cacheHint : i64 , %p : i1 ) {
0 commit comments