From 0dd4c4b5ae49662359a56f45bccc90b16aea35b0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 13 Jun 2021 21:35:24 -0700 Subject: [PATCH] [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. --- mlir/test/Dialect/GPU/invalid.mlir | 6 ++++++ mlir/test/Dialect/LLVMIR/global.mlir | 2 ++ 2 files changed, 8 insertions(+) diff --git a/mlir/test/Dialect/GPU/invalid.mlir b/mlir/test/Dialect/GPU/invalid.mlir index f399ddd..a1ed9fa 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 90cd8d2..efce9a4 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 } // ----- -- 2.7.4