brintos

brintos / llvm-project-archived public Read only

0
0
Text · 778 B · 28777a3 Raw
16 lines · plain
1// RUN: mlir-opt %s -generate-runtime-verification -cse | FileCheck %s2 3// CHECK-LABEL: func @expand_shape(4//  CHECK-SAME:     %[[m:.*]]: memref<?xf32>5//  CHECK-SAME:     %[[sz0:.*]]: index 6//   CHECK-DAG:   %[[c0:.*]] = arith.constant 0 : index7//   CHECK-DAG:   %[[c5:.*]] = arith.constant 5 : index8//   CHECK-DAG:   %[[dim:.*]] = memref.dim %[[m]], %[[c0]]9//       CHECK:   %[[mod:.*]] = arith.remsi %[[dim]], %[[c5]]10//       CHECK:   %[[cmpi:.*]] = arith.cmpi eq, %[[mod]], %[[c0]]11//       CHECK:   cf.assert %[[cmpi]], "ERROR: Runtime op verification failed12func.func @expand_shape(%m: memref<?xf32>, %sz0: index) -> memref<?x5xf32> {13  %0 = memref.expand_shape %m [[0, 1]] output_shape [%sz0, 5] : memref<?xf32> into memref<?x5xf32>14  return %0 : memref<?x5xf32>15}16