# `Beaver.MLIR.Dialect.CF`

This module defines functions for Ops in CF dialect.

# `assert`

Return op name `cf.assert` as a bitstring.

# `assert`

`cf.assert` - Assert operation with message attribute

## Attributes
- `msg` - Single, `StrAttr`, string attribute

## Operands
- `arg` - Single, `I1`, 1-bit signless integer
## Description
Assert operation at runtime with single boolean operand and an error
message attribute.
If the argument is `true` this operation has no effect. Otherwise, the
program execution will abort. The provided error message may be used by a
runtime to propagate the error to the user.

Example:

```mlir
cf.assert %b, "Expected ... to be true"
```

# `br`

Return op name `cf.br` as a bitstring.

# `br`

`cf.br` - Branch operation

## Operands
- `destOperands` - Variadic, `AnyType`, variadic of any non-token type
## Description
The `cf.br` operation represents a direct branch operation to a given
block. The operands of this operation are forwarded to the successor block,
and the number and type of the operands must match the arguments of the
target block.

Example:

```mlir
^bb2:
  %2 = call @someFn()
  cf.br ^bb3(%2 : tensor<*xf32>)
^bb3(%3: tensor<*xf32>):
```

# `cond_br`

Return op name `cf.cond_br` as a bitstring.

# `cond_br`

Create cf.cond_br op. Passing atom will lead to defer the creation of this terminator.

# `switch`

Return op name `cf.switch` as a bitstring.

# `switch`

`cf.switch` - Switch operation

## Attributes
- `case_values` - Optional, `AnyIntElementsAttr`, integer elements attribute
- `case_operand_segments` - Single, `DenseI32ArrayAttr`, i32 dense array attribute

## Operands
- `flag` - Single, `AnyInteger`, integer
- `defaultOperands` - Variadic, `AnyType`, variadic of any non-token type
- `caseOperands` - Variadic, `AnyType`, variadic of any non-token type
## Description
The `cf.switch` terminator operation represents a switch on a signless integer
value. If the flag matches one of the specified cases, then the
corresponding destination is jumped to. If the flag does not match any of
the cases, the default destination is jumped to. The count and types of
operands must align with the arguments in the corresponding target blocks.

Example:

```mlir
cf.switch %flag : i32, [
  default: ^bb1(%a : i32),
  42: ^bb1(%b : i32),
  43: ^bb3(%c : i32)
]
```

