[WebAssembly] Rename SWITCH to TABLESWITCH to match the current wording in the spec.
[oota-llvm.git] / lib / Target / WebAssembly / WebAssemblyInstrControl.td
index 998afbe51cbbc869c3d57376ba0358f418f7f4ef..92393d435c251133e8bf226ce1714f17e030df1e 100644 (file)
@@ -24,15 +24,15 @@ def BR   : I<(outs), (ins bb_op:$dst),
 } // 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.