[PATCH] D35027: [PowerPC] Reduce register pressure by not materializing a constant just for use as an index register for X-Form loads/stores

Eric Christopher via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 13:29:00 PDT 2017


echristo added inline comments.


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:2239-2243
+  // If the address is the result of an add, we will utilize the fact that the
+  // address calculation includes an implicit add. However we don't want to
+  // materialize a constant just for use as the index register. Unless this is
+  // an add of a value and a 16-bit signed constant and both have a single use,
+  // we get rid of the add.
----------------
Between this and the comment underneath the if conditional it's a little hard to understand the tradeoffs involved. Also Stefan's comment.


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:2244
+  // we get rid of the add.
+  short imm = 0;
+  if (N.getOpcode() == ISD::ADD &&
----------------
uint16_t Imm


https://reviews.llvm.org/D35027





More information about the llvm-commits mailing list