[WebAssembly] Reverse the order of operands for br_if
[oota-llvm.git] / lib / Target / WebAssembly / WebAssemblyInstrControl.td
index af73a93c2079afc8a054393cd2cdeb28c7204541..dd63e98efe993814d897886d9cd2c9471ac38fcc 100644 (file)
@@ -13,9 +13,9 @@
 //===----------------------------------------------------------------------===//
 
 let isBranch = 1, isTerminator = 1, hasCtrlDep = 1 in {
-def BR_IF : I<(outs), (ins bb_op:$dst, I32:$a),
+def BR_IF : I<(outs), (ins I32:$a, bb_op:$dst),
               [(brcond I32:$a, bb:$dst)],
-              "br_if\t$dst, $a">;
+               "br_if\t$a, $dst">;
 let isBarrier = 1 in {
 def BR   : I<(outs), (ins bb_op:$dst),
              [(br bb:$dst)],