Function melior_next::dialect::cf::switch
source · pub fn switch<'c>(
context: &'c Context,
case_values: &[String],
flag: Value<'_>,
default_destination: (&Block<'c>, &[Value<'_>]),
case_destinations: &[(&Block<'c>, &[Value<'_>])],
location: Location<'c>
) -> Operation<'c>
Expand description
cf switch
The 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.
cf.switch (::mlir::cf::SwitchOp)
Arguments
case_values
- The hard-coded constant values the flag matches against.default_destination
- the default case successor, with the operands it requires.case_destinations
- case successors, with the operands each successor requires.