• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: mlir-opt -split-input-file %s | mlir-opt
2// Verify the printed output can be parsed.
3// RUN: mlir-opt %s | mlir-opt
4// Verify the generic form can be parsed.
5// RUN: mlir-opt -mlir-print-op-generic %s | mlir-opt
6
7// -----
8
9func @operations(%attribute: !pdl.attribute,
10                 %input: !pdl.value,
11                 %type: !pdl.type) {
12  // attributes, operands, and results
13  %op0 = pdl_interp.create_operation "foo.op"(%input) {"attr" = %attribute} -> %type
14
15  // attributes, and results
16  %op1 = pdl_interp.create_operation "foo.op"() {"attr" = %attribute} -> %type
17
18  // attributes
19  %op2 = pdl_interp.create_operation "foo.op"() {"attr" = %attribute, "attr1" = %attribute} -> ()
20
21  // operands, and results
22  %op3 = pdl_interp.create_operation "foo.op"(%input) -> %type
23
24  pdl_interp.finalize
25}
26