Lines Matching +full:- +full:- +full:token
1 // RUN: mlir-opt %s | FileCheck %s
3 // CHECK-LABEL: @identity_token
4 func.func @identity_token(%arg0: !async.token) -> !async.token {
5 // CHECK: return %arg0 : !async.token
6 return %arg0 : !async.token
9 // CHECK-LABEL: @identity_value
10 func.func @identity_value(%arg0 : !async.value<f32>) -> !async.value<f32> {
15 // CHECK-LABEL: @empty_async_execute
16 func.func @empty_async_execute() -> !async.token {
18 %token = async.execute {
22 // CHECK: return %token : !async.token
23 return %token : !async.token
26 // CHECK-LABEL: @return_async_value
27 func.func @return_async_value() -> !async.value<f32> {
28 // CHECK: async.execute -> !async.value<f32>
29 %token, %bodyResults = async.execute -> !async.value<f32> {
38 // CHECK-LABEL: @return_captured_value
39 func.func @return_captured_value() -> !async.token {
41 // CHECK: async.execute -> !async.value<f32>
42 %token, %results = async.execute -> !async.value<f32> {
46 // CHECK: return %token : !async.token
47 return %token : !async.token
50 // CHECK-LABEL: @return_async_values
51 func.func @return_async_values() -> (!async.value<f32>, !async.value<f32>) {
52 %token, %bodyResults:2 = async.execute -> (!async.value<f32>, !async.value<f32>) {
62 // CHECK-LABEL: @async_token_dependencies
63 func.func @async_token_dependencies(%arg0: !async.token) -> !async.token {
65 %token = async.execute [%arg0] {
69 // CHECK: return %token : !async.token
70 return %token : !async.token
73 // CHECK-LABEL: @async_value_operands
74 func.func @async_value_operands(%arg0: !async.value<f32>) -> !async.token {
75 // CHECK: async.execute (%arg0 as %arg1: !async.value<f32>) -> !async.value<f32>
76 %token, %results = async.execute (%arg0 as %arg1: !async.value<f32>) -> !async.value<f32> {
80 // CHECK: return %token : !async.token
81 return %token : !async.token
84 // CHECK-LABEL: @async_token_and_value_operands
85 ….func @async_token_and_value_operands(%arg0: !async.token, %arg1: !async.value<f32>) -> !async.tok…
86 // CHECK: async.execute [%arg0] (%arg1 as %arg2: !async.value<f32>) -> !async.value<f32>
87 …%token, %results = async.execute [%arg0] (%arg1 as %arg2: !async.value<f32>) -> !async.value<f32> {
91 // CHECK: return %token : !async.token
92 return %token : !async.token
95 // CHECK-LABEL: @empty_tokens_or_values_operands
98 %token0 = async.execute [] () -> () { async.yield }
100 %token1 = async.execute () -> () { async.yield }
102 %token2 = async.execute -> () { async.yield }
110 // CHECK-LABEL: @await_token
111 func.func @await_token(%arg0: !async.token) {
113 async.await %arg0 : !async.token
117 // CHECK-LABEL: @await_value
118 func.func @await_value(%arg0: !async.value<f32>) -> f32 {
124 // CHECK-LABEL: @create_group_and_await_all
125 func.func @create_group_and_await_all(%arg0: !async.token,
126 %arg1: !async.value<f32>) -> index {
132 %1 = async.add_to_group %arg0, %0 : !async.token
140 // CHECK-LABEL: @async_func_return_token
141 async.func @async_func_return_token() -> !async.token {
146 // CHECK-LABEL: @async_func_return_value
147 async.func @async_func_return_value() -> !async.value<i32> {
153 // CHECK-LABEL: @async_func_return_optional_token
154 async.func @async_func_return_optional_token() -> (!async.token, !async.value<i32>) {
160 // CHECK-LABEL: @async_call
165 %0 = async.call @async_func_return_token() : () -> !async.token
166 %1 = async.call @async_func_return_value() : () -> !async.value<i32>
167 %2, %3 = async.call @async_func_return_optional_token() : () -> (!async.token, !async.value<i32>)