[Mlir-commits] [mlir] [MLIR][Transform] apply_registered_pass op's options as a dict (PR #143159)
Adam Siemieniuk
llvmlistbot at llvm.org
Tue Jun 10 06:11:30 PDT 2025
================
@@ -248,3 +299,77 @@ module attributes {transform.with_named_sequence} {
transform.yield
}
}
+
+// -----
+
+/////////////////////////////////////////////////////////////////////
+// Check that the following cases are caugh in the generic format. //
+/////////////////////////////////////////////////////////////////////
+
+// Invalid due to param_operand_index occurences in options dict not being
+// one-to-one with the dynamic options provided as params:
+// param_operand_index out of bounds w.r.t. the number of options provided via params.
+
+"builtin.module"() ({
+ "transform.named_sequence"() <{function_type = (!transform.any_op) -> (), sym_name = "__transform_main"}> ({
+ ^bb0(%arg0: !transform.any_op):
+ %0 = "transform.structured.match"(%arg0) <{ops = ["func.func"]}> : (!transform.any_op) -> !transform.any_op
+ %1 = "transform.param.constant"() <{value = 10 : i64}> : () -> !transform.any_param
+ // expected-error @below {{dynamic option index 1 is out of bounds for the number of dynamic options: 1}}
----------------
adam-smnk wrote:
Makes sense, I didn't notice that the last argument is an op so there's only one option to choose from.
https://github.com/llvm/llvm-project/pull/143159
More information about the Mlir-commits
mailing list