[Mlir-commits] [mlir] 0dd4c4b - [Testsuite] Change these tests to only have a single verification error, NFC.

Chris Lattner llvmlistbot at llvm.org
Sun Jun 13 21:36:40 PDT 2021


Author: Chris Lattner
Date: 2021-06-13T21:36:31-07:00
New Revision: 0dd4c4b5ae49662359a56f45bccc90b16aea35b0

URL: https://github.com/llvm/llvm-project/commit/0dd4c4b5ae49662359a56f45bccc90b16aea35b0
DIFF: https://github.com/llvm/llvm-project/commit/0dd4c4b5ae49662359a56f45bccc90b16aea35b0.diff

LOG: [Testsuite] Change these tests to only have a single verification error, NFC.

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.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/test/Dialect/GPU/invalid.mlir b/mlir/test/Dialect/GPU/invalid.mlir
index f399ddd8ba76b..a1ed9fa363a37 100644
--- a/mlir/test/Dialect/GPU/invalid.mlir
+++ b/mlir/test/Dialect/GPU/invalid.mlir
@@ -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
 }
 
 // -----

diff  --git a/mlir/test/Dialect/LLVMIR/global.mlir b/mlir/test/Dialect/LLVMIR/global.mlir
index 90cd8d2787e2c..efce9a4b3acd3 100644
--- a/mlir/test/Dialect/LLVMIR/global.mlir
+++ b/mlir/test/Dialect/LLVMIR/global.mlir
@@ -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
 }
 
 // -----


        


More information about the Mlir-commits mailing list