[Testsuite] Change these tests to only have a single verification error, NFC.
authorChris Lattner <clattner@nondot.org>
Mon, 14 Jun 2021 04:35:24 +0000 (21:35 -0700)
committerChris Lattner <clattner@nondot.org>
Mon, 14 Jun 2021 04:36:31 +0000 (21:36 -0700)
These are testing for various verification failures, but have missing returns
at the end of their function.  Add the returns to focus the tests better.

mlir/test/Dialect/GPU/invalid.mlir
mlir/test/Dialect/LLVMIR/global.mlir

index f399ddd..a1ed9fa 100644 (file)
@@ -244,6 +244,7 @@ func @reduce_op_and_body(%arg0 : f32) {
   ^bb(%lhs : f32, %rhs : f32):
     "gpu.yield"(%lhs) : (f32) -> ()
   }) {op = "add"} : (f32) -> (f32)
+  return
 }
 
 // -----
@@ -270,6 +271,7 @@ func @reduce_incorrect_region_arguments(%arg0 : f32) {
   ^bb(%lhs : f32):
     "gpu.yield"(%lhs) : (f32) -> ()
   }) : (f32) -> (f32)
+  return
 }
 
 // -----
@@ -280,6 +282,7 @@ func @reduce_incorrect_region_arguments(%arg0 : f32) {
   ^bb(%lhs : f32, %rhs : i32):
     "gpu.yield"(%lhs) : (f32) -> ()
   }) : (f32) -> (f32)
+  return
 }
 
 // -----
@@ -290,6 +293,7 @@ func @reduce_incorrect_yield(%arg0 : f32) {
   ^bb(%lhs : f32, %rhs : f32):
     "gpu.yield"(%lhs, %rhs) : (f32, f32) -> ()
   }) : (f32) -> (f32)
+  return
 }
 
 // -----
@@ -301,6 +305,7 @@ func @reduce_incorrect_yield(%arg0 : f32) {
     %one = constant 1 : i32
     "gpu.yield"(%one) : (i32) -> ()
   }) : (f32) -> (f32)
+  return
 }
 
 // -----
@@ -311,6 +316,7 @@ func @reduce_incorrect_yield(%arg0 : f32) {
   ^bb(%lhs : f32, %rhs : f32):
     return
   }) : (f32) -> (f32)
+  return
 }
 
 // -----
index 90cd8d2..efce9a4 100644 (file)
@@ -108,6 +108,8 @@ llvm.mlir.global internal constant @constant(37.0) : !llvm.label
 func @foo() {
   // expected-error @+1 {{must appear at the module level}}
   llvm.mlir.global internal @bar(42) : i32
+
+  return
 }
 
 // -----