low.func.exit
← low dialect
Conditionally return from the nearest enclosing low function or kernel. The exit region evaluates only when the register predicate is true and terminates with the enclosing callable's low.return result contract.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
UnknownEffects |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
condition |
register |
required |
Register predicate controlling the exit. |
| Region |
body |
region |
required |
Work and returned register values evaluated only on the taken exit. (single block, terminator low.return.) |
Examples
low.func.exit %done : reg<wasm.i32> {
low.return
}
low.func.exit %found : reg<spirv.id : i1> {
low.return %value : reg<spirv.id : i32>
}