From bd44fcb8ffe30b23e75a1971514fc36b2d9eefc2 Mon Sep 17 00:00:00 2001 From: Nicolas Vasilache Date: Sun, 26 Aug 2018 10:56:24 -0700 Subject: [PATCH] Fix confusing CHECK-EMPTY in affine-map test This commit replaces // CHECK-EMPTY because it is an extremely confusing way of allowing (but not checking for) empty lines. The problem is that // CHECK-EMPTY is **only a comment** and does not do anything. I originally tried to use // CHECK-EMPTY: but errors occured due to missing newlines. The intended behavior of the test is to enforce nothing (not even a newline) is printed and the proper way to check for this is to use CHECK-NOT. Thanks to @rxwei for helping me figure out to use CHECK-NOT properly. PiperOrigin-RevId: 210286262 --- mlir/test/IR/affine-map.mlir | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mlir/test/IR/affine-map.mlir b/mlir/test/IR/affine-map.mlir index bb9cbb6a71fa..9ef4cf4a6ad5 100644 --- a/mlir/test/IR/affine-map.mlir +++ b/mlir/test/IR/affine-map.mlir @@ -7,16 +7,17 @@ #map1 = (i, j)[s0] -> (i, j) // CHECK: #map{{[0-9]+}} = () -> (0) -// A map may have 0 inputs. However, an affine_apply always takes at least one input. +// A map may have 0 inputs. +// However, an affine_apply always takes at least one input. #map2 = () -> (0) -// All three maps are unique'd as one map and so there -// should be only one output. +// All the maps in the following block are equivalent and are unique'd as one +// map. Therefore there should be only one output and we explicitly CHECK-NOT +// for the others. // CHECK: #map{{[0-9]+}} = (d0, d1) -> (d0 + 1, d1 * 4 + 2) #map3 = (i, j) -> (i+1, 4*j + 2) -// CHECK-EMPTY +// CHECK-NOT: #map3{{[a-z]}} #map3a = (i, j) -> (1+i, 4*j + 2) -// CHECK-EMPTY #map3b = (i, j) -> (2 + 3 - 2*2 + i, 4*j + 2) #map3c = (i, j) -> (i +1 + 0, 4*j + 2) #map3d = (i, j) -> (i + 3 + 2 - 4, 4*j + 2)