[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.
This commit is contained in:
Chris Lattner 2021-06-13 21:35:24 -07:00
parent 9c5d43fb55
commit 0dd4c4b5ae
2 changed files with 8 additions and 0 deletions

View 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
}
// -----

View 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
}
// -----