[PATCH] D17942: [Aarch64] Optimize test and branch sequence when the test's constant operand is power of 2

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 16:29:55 PST 2016


t.p.northover added inline comments.

================
Comment at: include/llvm/Target/TargetInstrInfo.h:1109
@@ -1108,1 +1108,3 @@
 
+  virtual bool optimizeTestAndBranch(MachineInstr *MI) const {return false; }
+
----------------
I think you're misinterpreting `optimizeCondBranch` it's for any conditional control flow at the end of a basic block, and in fact the AArch64 version already handles some TBZ cases.

So I think the logic of this function should be folded into the other (as neatly as possible).


http://reviews.llvm.org/D17942





More information about the llvm-commits mailing list