diff options
author | Dan Gohman <dan433584@gmail.com> | 2016-03-08 03:18:12 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2016-03-08 03:18:12 +0000 |
commit | 1402606477098c75c36f83883c5e0c2d7d4fcdc7 (patch) | |
tree | 756dd7fd9ece5891f6701ac9fb6168fc28c7d5c2 /llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td | |
parent | 671febc0f774875f39c222894522a80df6d05097 (diff) | |
download | bcm5719-llvm-1402606477098c75c36f83883c5e0c2d7d4fcdc7.tar.gz bcm5719-llvm-1402606477098c75c36f83883c5e0c2d7d4fcdc7.zip |
[WebAssembly] Update for spec change from tableswitch to br_table.
Also note that the operand order changed; the default label is now listed
after the regular labels.
llvm-svn: 262903
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td index 604e48ce769..ba4e1f989a9 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td @@ -39,20 +39,20 @@ def : Pat<(brcond (i32 (seteq I32:$cond, 0)), bb:$dst), let Defs = [ARGUMENTS] in { // TODO: SelectionDAG's lowering insists on using a pointer as the index for -// jump tables, so in practice we don't ever use TABLESWITCH_I64 in wasm32 mode +// jump tables, so in practice we don't ever use BR_TABLE_I64 in wasm32 mode // currently. // Set TSFlags{0} to 1 to indicate that the variable_ops are immediates. // Set TSFlags{1} to 1 to indicate that the immediates represent labels. let isTerminator = 1, hasCtrlDep = 1, isBarrier = 1 in { -def TABLESWITCH_I32 : I<(outs), (ins I32:$index, bb_op:$default, variable_ops), - [(WebAssemblytableswitch I32:$index, bb:$default)], - "tableswitch\t$index, $default"> { +def BR_TABLE_I32 : I<(outs), (ins I32:$index, variable_ops), + [(WebAssemblybr_table I32:$index)], + "br_table \t$index"> { let TSFlags{0} = 1; let TSFlags{1} = 1; } -def TABLESWITCH_I64 : I<(outs), (ins I64:$index, bb_op:$default, variable_ops), - [(WebAssemblytableswitch I64:$index, bb:$default)], - "tableswitch\t$index, $default"> { +def BR_TABLE_I64 : I<(outs), (ins I64:$index, variable_ops), + [(WebAssemblybr_table I64:$index)], + "br_table \t$index"> { let TSFlags{0} = 1; let TSFlags{1} = 1; } |