1// RUN: mlir-opt --test-transform-dialect-interpreter %s | FileCheck %s
2
3// CHECK-LABEL: func.func @generalize_unary
4func.func @generalize_unary(%arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf32>) -> tensor<?x?xf32> {
5
6  // CHECK-NOT:   linalg.elemwise_unary
7  //     CHECK:   linalg.generic
8  %0 = linalg.elemwise_unary ins(%arg0 : tensor<?x?xf32>)
9                             outs(%arg1: tensor<?x?xf32>) -> tensor<?x?xf32>
10  return %0 : tensor<?x?xf32>
11}
12
13transform.with_pdl_patterns {
14^bb0(%arg0: !pdl.operation):
15  transform.sequence %arg0 {
16  ^bb1(%arg1: !pdl.operation):
17    %0 = transform.structured.match ops{["linalg.elemwise_unary"]} in %arg1
18    %1 = transform.structured.generalize %0
19  }
20}
21