} // isBranch = 1, isTerminator = 1, hasCtrlDep = 1
// TODO: SelectionDAG's lowering insists on using a pointer as the index for
-// jump tables, so in practice we don't ever use SWITCH_I64 in wasm32 mode
+// jump tables, so in practice we don't ever use TABLESWITCH_I64 in wasm32 mode
// currently.
let isTerminator = 1, hasCtrlDep = 1, isBarrier = 1 in {
-def SWITCH_I32 : I<(outs), (ins I32:$index, variable_ops),
- [(WebAssemblyswitch I32:$index)],
- "switch \t$index">;
-def SWITCH_I64 : I<(outs), (ins I64:$index, variable_ops),
- [(WebAssemblyswitch I64:$index)],
- "switch \t$index">;
+def TABLESWITCH_I32 : I<(outs), (ins I32:$index, variable_ops),
+ [(WebAssemblytableswitch I32:$index)],
+ "tableswitch\t$index">;
+def TABLESWITCH_I64 : I<(outs), (ins I64:$index, variable_ops),
+ [(WebAssemblytableswitch I64:$index)],
+ "tableswitch\t$index">;
} // isTerminator = 1, hasCtrlDep = 1, isBarrier = 1
// Placemarkers to indicate the start of a block or loop scope.