diff options
author | Dan Gohman <dan433584@gmail.com> | 2016-02-08 21:50:13 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2016-02-08 21:50:13 +0000 |
commit | 06b495826044483ca9cf98dcb2fccd5e41b17eb4 (patch) | |
tree | 31d870d6e238d0e6cfdae42ad1fe5e09c22e5cfc /llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td | |
parent | 4d36bbaf19821135bbf8b23f8b8f446ae97736e1 (diff) | |
download | bcm5719-llvm-06b495826044483ca9cf98dcb2fccd5e41b17eb4.tar.gz bcm5719-llvm-06b495826044483ca9cf98dcb2fccd5e41b17eb4.zip |
[WebAssembly] Update the br_if instructions' operand orders to match the spec.
llvm-svn: 260152
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td index fda95953db8..604e48ce769 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td @@ -16,12 +16,12 @@ let Defs = [ARGUMENTS] in { let isBranch = 1, isTerminator = 1, hasCtrlDep = 1 in { // The condition operand is a boolean value which WebAssembly represents as i32. -def BR_IF : I<(outs), (ins I32:$cond, bb_op:$dst), +def BR_IF : I<(outs), (ins bb_op:$dst, I32:$cond), [(brcond I32:$cond, bb:$dst)], - "br_if \t$cond, $dst">; + "br_if \t$dst, $cond">; let isCodeGenOnly = 1 in -def BR_UNLESS : I<(outs), (ins I32:$cond, bb_op:$dst), [], - "br_unless\t$cond, $dst">; +def BR_UNLESS : I<(outs), (ins bb_op:$dst, I32:$cond), [], + "br_unless\t$dst, $cond">; let isBarrier = 1 in { def BR : I<(outs), (ins bb_op:$dst), [(br bb:$dst)], @@ -32,9 +32,9 @@ def BR : I<(outs), (ins bb_op:$dst), } // Defs = [ARGUMENTS] def : Pat<(brcond (i32 (setne I32:$cond, 0)), bb:$dst), - (BR_IF I32:$cond, bb_op:$dst)>; + (BR_IF bb_op:$dst, I32:$cond)>; def : Pat<(brcond (i32 (seteq I32:$cond, 0)), bb:$dst), - (BR_UNLESS I32:$cond, bb_op:$dst)>; + (BR_UNLESS bb_op:$dst, I32:$cond)>; let Defs = [ARGUMENTS] in { |