diff --git a/tests/filecheck/dialects/linalg_extension.mlir b/tests/filecheck/dialects/linalg_extension.mlir new file mode 100644 index 00000000..ee4b5521 --- /dev/null +++ b/tests/filecheck/dialects/linalg_extension.mlir @@ -0,0 +1,18 @@ +// RUN: XDSL_ROUNDTRIP + +%0, %1, %2 = "test.op"() : () -> (memref<64xi32>, memref<64xi32>, memref<64xi32>) + +"linalg.mul"(%0, %1, %2) <{operandSegmentSizes = array}> ({ + ^bb0(%arg2: i32, %arg3: i32, %arg4: i32): + %s1 = "arith.muli"(%arg2, %arg3) : (i32, i32) -> i32 + "linalg.yield"(%s1) : (i32) -> () + }) : (memref<64xi32>, memref<64xi32>, memref<64xi32>) -> () + +//CHECK: builtin.module { +//CHECK-NEXT: %0, %1, %2 = "test.op"() : () -> (memref<64xi32>, memref<64xi32>, memref<64xi32>) +//CHECK-NEXT: "linalg.mul"(%0, %1, %2) <{"operandSegmentSizes" = array}> ({ +//CHECK-NEXT: ^0(%arg2 : i32, %arg3 : i32, %arg4 : i32): +//CHECK-NEXT: %s1 = arith.muli %arg2, %arg3 : i32 +//CHECK-NEXT: linalg.yield %s1 : i32 +//CHECK-NEXT: }) : (memref<64xi32>, memref<64xi32>, memref<64xi32>) -> () +//CHECK-NEXT: } diff --git a/tests/filecheck/lit.cfg b/tests/filecheck/lit.cfg index b1831c55..1e1dc632 100644 --- a/tests/filecheck/lit.cfg +++ b/tests/filecheck/lit.cfg @@ -8,5 +8,5 @@ config.name = "SNAX" config.test_format = lit.formats.ShTest(preamble_commands=[f"cd {snax_src}"]) config.suffixes = ['.test', '.mlir', '.py'] -config.substitutions.append(('XDSL_ROUNDTRIP', "snax-opt %s --print-op-generic --split-input-file | snax-opt --split-input-file | filecheck %s")) -config.substitutions.append(("XDSL_GENERIC_ROUNDTRIP", "snax-opt %s --print-op-generic --split-input-file | filecheck %s --check-prefix=CHECK-GENERIC")) +config.substitutions.append(('XDSL_ROUNDTRIP', "./compiler/snax-opt %s --print-op-generic --split-input-file | ./compiler/snax-opt --split-input-file | filecheck %s")) +config.substitutions.append(("XDSL_GENERIC_ROUNDTRIP", "./compiler/snax-opt %s --print-op-generic --split-input-file | filecheck %s --check-prefix=CHECK-GENERIC"))