brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 3552331 Raw
24 lines · plain
1// RUN: mlir-opt -verify-diagnostics -ownership-based-buffer-deallocation \2// RUN:   --buffer-deallocation-simplification -split-input-file %s | FileCheck %s3// RUN: mlir-opt -verify-diagnostics -ownership-based-buffer-deallocation=private-function-dynamic-ownership=true -split-input-file %s > /dev/null4 5// RUN: mlir-opt %s -buffer-deallocation-pipeline --split-input-file > /dev/null6 7// CHECK-LABEL: func @subview8func.func @subview(%arg0 : index, %arg1 : index, %arg2 : memref<?x?xf32>) {9  %0 = memref.alloc() : memref<64x4xf32, strided<[4, 1], offset: 0>>10  %1 = memref.subview %0[%arg0, %arg1][%arg0, %arg1][%arg0, %arg1] :11    memref<64x4xf32, strided<[4, 1], offset: 0>>12  to memref<?x?xf32, strided<[?, ?], offset: ?>>13  test.copy(%1, %arg2) :14    (memref<?x?xf32, strided<[?, ?], offset: ?>>, memref<?x?xf32>)15  return16}17 18//      CHECK: %[[ALLOC:.*]] = memref.alloc()19// CHECK-NEXT: memref.subview20// CHECK-NEXT: test.copy21// CHECK-NEXT: bufferization.dealloc (%[[ALLOC]] :22// CHECK-SAME:   if (%true)23// CHECK-NEXT: return24