[PATCH] [mips] Add support for branch-likely pseudo-instructions

Daniel Sanders daniel.sanders at imgtec.com
Thu Jun 18 08:56:15 PDT 2015


LGTM with a couple nits and a revised commit message.

> This work is based on http://reviews.llvm.org/D8537


Nit: Please reference r239905 rather than http://reviews.llvm.org/D8537 when you commit.

> https://dmz-portal.mips.com/bugz/show_bug.cgi?id=699


There's rarely a need to reference the MIPS bugzilla here. http://llvm.org/PR22994 is the LLVM ticket for this.


================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:2472-2476
@@ -2443,3 +2471,7 @@
 
-  BranchInst.setOpcode(AcceptsEquality ? Mips::BEQ : Mips::BNE);
+  if (!IsLikely) {
+    BranchInst.setOpcode(AcceptsEquality ? Mips::BEQ : Mips::BNE);
+  } else {
+    BranchInst.setOpcode(AcceptsEquality ? Mips::BEQL : Mips::BNEL);
+  }
   BranchInst.addOperand(MCOperand::createReg(ATRegNum));
----------------
Nit: Don't use redundant braces.

================
Comment at: test/MC/Mips/branch-pseudos.s:190-191
@@ -189,1 +189,4 @@
 # CHECK: nop
+
+
+
----------------
Nit: Unnecessary blank lines

http://reviews.llvm.org/D10537

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list