44 lines · plain
1// RUN: mlir-opt %s -verify-diagnostics -split-input-file2 3irdl.dialect @errors {4 irdl.operation @operands {5 %0 = irdl.is i326 7 // expected-error@+1 {{'irdl.operands' op the number of operands and their variadicities must be the same, but got 2 and 1 respectively}}8 "irdl.operands"(%0, %0) <{names = ["foo", "bar"], variadicity = #irdl<variadicity_array[single]>}> : (!irdl.attribute, !irdl.attribute) -> ()9 }10}11 12// -----13 14irdl.dialect @errors {15 irdl.operation @operands2 {16 %0 = irdl.is i3217 18 // expected-error@+1 {{'irdl.operands' op the number of operands and their variadicities must be the same, but got 1 and 2 respectively}}19 "irdl.operands"(%0) <{names = ["foo"], variadicity = #irdl<variadicity_array[single, single]>}> : (!irdl.attribute) -> ()20 }21}22 23// -----24 25irdl.dialect @errors {26 irdl.operation @results {27 %0 = irdl.is i3228 29 // expected-error@+1 {{'irdl.results' op the number of results and their variadicities must be the same, but got 2 and 1 respectively}}30 "irdl.results"(%0, %0) <{names = ["foo", "bar"], variadicity = #irdl<variadicity_array[single]>}> : (!irdl.attribute, !irdl.attribute) -> ()31 }32}33 34// -----35 36irdl.dialect @errors {37 irdl.operation @results2 {38 %0 = irdl.is i3239 40 // expected-error@+1 {{'irdl.results' op the number of results and their variadicities must be the same, but got 1 and 2 respectively}}41 "irdl.results"(%0) <{names = ["foo"], variadicity = #irdl<variadicity_array[single, single]>}> : (!irdl.attribute) -> ()42 }43}44