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
This commit is contained in:
Nicolas Vasilache 2018-08-26 10:56:24 -07:00 committed by jpienaar
parent 851353687f
commit bd44fcb8ff
1 changed files with 6 additions and 5 deletions

View File

@ -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)