[WebAssembly] Make tableswitch's 'default' operand explicit. NFC.
authorDan Gohman <dan433584@gmail.com>
Sun, 6 Dec 2015 19:34:57 +0000 (19:34 +0000)
committerDan Gohman <dan433584@gmail.com>
Sun, 6 Dec 2015 19:34:57 +0000 (19:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254883 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyInstrControl.td

index 708d902e99e1e7c533ff019ae93559299c96d257..9a9468bb3909c242c85c04ee0f0445d9a5c544cf 100644 (file)
@@ -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 {
 // 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.
 } // isTerminator = 1, hasCtrlDep = 1, isBarrier = 1
 
 // Placemarkers to indicate the start of a block or loop scope.