[mlir] fix test failure in EDSC/builder-api-test
authorHiroshi Inoue <inouehrs@jp.ibm.com>
Thu, 9 Jan 2020 13:03:23 +0000 (13:03 +0000)
committerHiroshi Inoue <inouehrs@jp.ibm.com>
Thu, 9 Jan 2020 13:11:42 +0000 (13:11 +0000)
This patch fixes a test failure on a non-intel (PowerPC64) box.
The two affine.load are independent and hence llvm may reorder them.
The CHECK lines are modified for supporting reordered case.

Differential Revision: https://reviews.llvm.org/D72435

mlir/test/EDSC/builder-api-test.cpp

index c776ffe..64e1b70 100644 (file)
@@ -724,9 +724,10 @@ TEST_FUNC(indirect_access) {
   // clang-format on
 
   // clang-format off
-  // CHECK-LABEL: func @indirect_access(
-  // CHECK:  [[B:%.*]] = affine.load
-  // CHECK:  [[D:%.*]] = affine.load
+  // CHECK-LABEL: func @indirect_access
+  // CHECK-SAME: (%[[ARG0:.*]]: memref<?xf32>, %[[ARG1:.*]]: memref<?xf32>, %[[ARG2:.*]]: memref<?xf32>, %[[ARG3:.*]]: memref<?xf32>)
+  // CHECK-DAG:  [[B:%.*]] = affine.load %[[ARG1]]
+  // CHECK-DAG:  [[D:%.*]] = affine.load %[[ARG3]]
   // CHECK:  load %{{.*}}{{\[}}[[B]]{{\]}}
   // CHECK:  store %{{.*}}, %{{.*}}{{\[}}[[D]]{{\]}}
   // clang-format on