[PATCH] D116424: [ShrinkWrap] check for PPC's non-callee-saved LR

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 7 12:07:48 PST 2022


jyknight added inline comments.


================
Comment at: llvm/lib/CodeGen/ShrinkWrap.cpp:296
+      // want to shrinkwrap across such an MachineInstr.
+      if (!UseOrDefCSR && MO.isEarlyClobber()) {
+        const MachineFunction *MF = MI.getParent()->getParent();
----------------
nickdesaulniers wrote:
> FWIW: this special case is also implicit-def. The full MachineOperand is `implicit-def early-clobber $lr`.
It's not clear to me why this checks "earlyclobber" -- surely it'd be wrong to shrinkwrap around any other uses of LR, as well, not just ones from inlineasm clobbers?

Thus, I'd suggest removing " && MO.isEarlyClobber()" here. Hopefully that won't cause any more test diffs. (And if it does, either that's showing examples of other more non-asm things we're getting wrong, or else show that I don't understand how it's supposed to work...)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116424/new/

https://reviews.llvm.org/D116424



More information about the llvm-commits mailing list