Emit function name being tested in TestMemRefStrideCalculation

Bring back CHECK-LABEL post

PiperOrigin-RevId: 271166428
This commit is contained in:
Jacques Pienaar 2019-09-25 11:23:15 -07:00 committed by A. Unique TensorFlower
parent 9b7435fb50
commit 3848baec69
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
// RUN: mlir-opt %s -test-memref-stride-calculation | FileCheck %s
// RUN: mlir-opt %s -test-memref-stride-calculation -o /dev/null | FileCheck %s
func @f(%0: index) {
// CHECK-LABEL: Testing: f
%1 = alloc() : memref<3x4x5xf32>
// CHECK: MemRefType offset: 0 strides: 20, 5, 1
%2 = alloc(%0) : memref<3x4x?xf32>

View File

@ -32,6 +32,7 @@ struct TestMemRefStrideCalculation
// Traverse AllocOp and compute strides of each MemRefType independently.
void TestMemRefStrideCalculation::runOnFunction() {
llvm::outs() << "Testing: " << getFunction().getName() << "\n";
getFunction().walk([&](AllocOp allocOp) {
auto memrefType = allocOp.getResult()->getType().cast<MemRefType>();
SmallVector<int64_t, 4> strideVector;