[mlir][scf] Add scf-to-cf lowering for `scf.index_switch`
commit91effec852879ed3588fa6b54015ac128642b8fd
authorJeff Niu <jeff@modular.com>
Thu, 27 Oct 2022 20:43:41 +0000 (27 13:43 -0700)
committerJeff Niu <jeff@modular.com>
Mon, 31 Oct 2022 19:01:22 +0000 (31 12:01 -0700)
treeb9bb3ee53251ef7cf6c6947ddfc54950e5ba7cdf
parent144e38f5e5fc98aebc5f37edf272fcd0446d4701
[mlir][scf] Add scf-to-cf lowering for `scf.index_switch`

This patch adds lowering from `scf.index_switch` to `cf.switch.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D136883
mlir/lib/Conversion/SCFToControlFlow/SCFToControlFlow.cpp
mlir/test/Conversion/SCFToControlFlow/convert-to-cfg.mlir