[mlir][scf] Add an IndexSwitchOp
The `scf.index_switch` is a control-flow operation that branches to one of the given regions based on the values of the argument and the cases. The argument is always of type `index`. Example: ```mlir %0 = scf.index_switch %arg0 -> i32 case 2 { %1 = arith.constant 10 : i32 scf.yield %1 : i32 } case 5 { %2 = arith.constant 20 : i32 scf.yield %2 : i32 } default { %3 = arith.constant 30 : i32 scf.yield %3 : i32 } ``` Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D136003
Loading
Please sign in to comment