[llvm] r254883 - [WebAssembly] Make tableswitch's 'default' operand explicit. NFC.

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 6 11:34:57 PST 2015


Author: djg
Date: Sun Dec  6 13:34:57 2015
New Revision: 254883

URL: http://llvm.org/viewvc/llvm-project?rev=254883&view=rev
Log:
[WebAssembly] Make tableswitch's 'default' operand explicit. NFC.

Modified:
    llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrControl.td

Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrControl.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrControl.td?rev=254883&r1=254882&r2=254883&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrControl.td (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrControl.td Sun Dec  6 13:34:57 2015
@@ -42,12 +42,12 @@ let Defs = [ARGUMENTS] in {
 // 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 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">;
+def TABLESWITCH_I32 : I<(outs), (ins I32:$index, bb_op:$default, variable_ops),
+                        [(WebAssemblytableswitch I32:$index, bb:$default)],
+                        "tableswitch\t$index, $default">;
+def TABLESWITCH_I64 : I<(outs), (ins I64:$index, bb_op:$default, variable_ops),
+                        [(WebAssemblytableswitch I64:$index, bb:$default)],
+                        "tableswitch\t$index, $default">;
 } // isTerminator = 1, hasCtrlDep = 1, isBarrier = 1
 
 // Placemarkers to indicate the start of a block or loop scope.




More information about the llvm-commits mailing list