1// RUN: mlir-opt %s -test-linalg-transform-patterns=test-linalg-promotion-options -split-input-file | FileCheck %s 2 3func @gemm(%a : memref<?x?xf32>, %b : memref<?x?xf32>, %c : memref<?x?xf32>) 4{ 5 linalg.matmul {__internal_linalg_transform__ = "START"} 6 ins(%a, %b: memref<?x?xf32>, memref<?x?xf32>) 7 outs(%c: memref<?x?xf32>) 8 return 9} 10 11// CHECK: func @gemm 12// CHECK-SAME: %[[ARG0:[a-zA-Z0-9_]+]]: memref<?x?xf32> 13// CHECK-SAME: %[[ARG1:[a-zA-Z0-9_]+]]: memref<?x?xf32> 14// CHECK-SAME: %[[ARG2:[a-zA-Z0-9_]+]]: memref<?x?xf32> 15// CHECK-DAG: %[[C42:.+]] = constant 4.200000e+01 : f32 16// CHECK: scf.for 17// CHECK: scf.for 18// CHECK: scf.for 19// CHECK: %[[T7:.+]] = subview %[[ARG0]] 20// CHECK: %[[T12:.+]] = subview %[[ARG1]] 21// CHECK: %[[T17:.+]] = subview %[[ARG2]] 22// CHECK: %[[T18:.+]] = alloc(%{{.*}}, %{{.*}}) : memref<?x?xf32, 3> 23// CHECK: %[[T19:.+]] = subview %[[T18]] 24// CHECK: %[[T20:.+]] = alloc(%{{.*}}, %{{.*}}) : memref<?x?xf32, 3> 25// CHECK: %[[T21:.+]] = subview %[[T20]] 26// CHECK: linalg.fill(%[[T19]], %[[C42]]) 27// CHECK: linalg.copy(%[[T7]], %[[T19]]) 28// CHECK: linalg.fill(%[[T21]], %[[C42]]) 29// CHECK: linalg.copy(%[[T17]], %[[T21]]) 30// CHECK: linalg.matmul ins(%[[T19]], %[[T12]]{{.*}} outs(%[[T21]] 31// CHECK-NOT: linalg.fill 32// CHECK: linalg.copy(%[[T21]], %[[T17]]) 33// CHECK: dealloc %[[T18]] 34// CHECK: dealloc %[[T20]] 35