Fix CHECK-EMPTY directives without trailing colon
authorSmit Hinsu <hinsu@google.com>
Fri, 12 Apr 2019 17:31:21 +0000 (10:31 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Thu, 18 Apr 2019 18:48:01 +0000 (11:48 -0700)
There are no empty lines in output for three of these directives so removed
them and replaced the remaining one with 'CHECK-NOT:' as otherwise it is
failing with the following error.

error: found 'CHECK-EMPTY' without previous 'CHECK: line

TESTED = n/a
PiperOrigin-RevId: 243288605

mlir/test/IR/parser.mlir
mlir/test/Transforms/memref-bound-check.mlir

index b9d2b61..7233af0 100644 (file)
@@ -31,7 +31,7 @@
 #bound_map2 = (i)[s] -> (i + s, i - s)
 
 // All maps appear in arbitrary order before all sets, in arbitrary order.
-// CHECK-EMPTY
+// CHECK-NOT: Placeholder
 
 // CHECK-DAG: #set{{[0-9]+}} = (d0)[s0, s1] : (d0 >= 0, -d0 + s0 >= 0, s0 - 5 == 0, -d0 + s1 + 1 >= 0)
 #set0 = (i)[N, M] : (i >= 0, -i + N >= 0, N - 5 == 0, -i + M + 1 >= 0)
@@ -526,7 +526,6 @@ func @externalfuncattr() -> ()
 
 // CHECK-LABEL: func @funcattrempty
 func @funcattrempty() -> ()
-  // CHECK-EMPTY
   attributes {}
 
 // CHECK-LABEL: func @funcattr
@@ -539,7 +538,6 @@ func @funcattr() -> ()
 
 // CHECK-LABEL: func @funcattrwithblock
 func @funcattrwithblock() -> ()
-  // CHECK-EMPTY
   attributes {} {
 ^bb0:
   return
index 41f5667..b65a41a 100644 (file)
@@ -16,7 +16,7 @@ func @test() {
       %idx0 = affine.apply (d0, d1) -> (d0)(%i, %j)
       %idx1 = affine.apply (d0, d1) -> (d1)(%i, %j)
       // Out of bound access.
-      %x  = load %A[%idx0, %idx1] : memref<9 x 9 x i32>  
+      %x  = load %A[%idx0, %idx1] : memref<9 x 9 x i32>
       // expected-error@-1 {{'std.load' op memref out of upper bound access along dimension #1}}
       // expected-error@-2 {{'std.load' op memref out of lower bound access along dimension #1}}
       // expected-error@-3 {{'std.load' op memref out of upper bound access along dimension #2}}
@@ -56,7 +56,6 @@ func @test_mod_floordiv_ceildiv() {
       %idy1 = affine.apply (d0, d1, d2) -> (d1 floordiv 4)(%i, %j, %j)
       %idy2 = affine.apply (d0, d1, d2) -> (d2 ceildiv 4 - 1)(%i, %j, %j)
       store %x, %A[%idy0, %idy1, %idy2] : memref<128 x 64 x 64 x i32> // expected-error {{'std.store' op memref out of lower bound access along dimension #3}}
-      // CHECK-EMPTY
     } // CHECK }
   } // CHECK }
   return