[PATCH] Optimize long branch for MIPS64 by removing calculation of %higher and %highest

Mark Seaborn mseaborn at chromium.org
Thu Apr 3 14:15:57 PDT 2014



================
Comment at: lib/Target/Mips/MipsLongBranch.cpp:328
@@ -330,2 +327,3 @@
+      //  daddiu $at, $zero, 0
       //  daddiu $at, $at, %hi($tgt - $baltgt)
       //  bal $baltgt
----------------
Does 64-bit MIPS not have an instruction for setting bits 16-31 of a register while zeroing the others (as 32-bit MIPS' "lui" instruction does)?

What does lui64 do?

This part looks OK to me, but I'm not familiar with 64-bit MIPS, so you might want to get someone who is sign off on the change too.

================
Comment at: lib/Target/Mips/MipsLongBranch.cpp:353
@@ -352,3 +371,1 @@
         .addReg(Mips::SP_64).addImm(0);
-      BuildMI(*LongBrMBB, Pos, DL, TII->get(Mips::LONG_BRANCH_LUi64), Mips::AT_64)
-        .addMBB(TgtMBB).addMBB(BalTgtMBB);
----------------
Is this change based on your not-yet-committed change?  If you, presumably you should remove LONG_BRANCH_LUi64 too?  Or you might want to commit this change first so that you don't have to add LONG_BRANCH_LUi64?


http://llvm-reviews.chandlerc.com/D3281



More information about the llvm-commits mailing list