Files
clang-p2996/mlir/test/Dialect/Async/verify.mlir
River Riddle 5e7dea225b [mlir][NFC] Update textual references of func to func.func in AMX/Arithmetic/ArmSVE/Async tests
The special case parsing of `func` operations is being removed.
2022-04-20 22:17:28 -07:00

22 lines
652 B
MLIR

// RUN: mlir-opt %s -split-input-file -verify-diagnostics | FileCheck %s
// FileCheck test must have at least one CHECK statement.
// CHECK-LABEL: @no_op
func.func @no_op(%arg0: !async.token) {
return
}
// -----
func.func @wrong_async_await_arg_type(%arg0: f32) {
// expected-error @+1 {{'async.await' op operand #0 must be async value type or async token type, but got 'f32'}}
async.await %arg0 : f32
}
// -----
func.func @wrong_async_await_result_type(%arg0: !async.value<f32>) {
// expected-error @+1 {{'async.await' op result type 'f64' does not match async value type 'f32'}}
%0 = "async.await"(%arg0): (!async.value<f32>) -> f64
}