[PATCH] D77034: [PowerPC] Don't do the folding if the operand is R0/X0

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 03:44:58 PDT 2020


nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.

Ugh...
So we have a transformation that is called `foldFrameOffset()` and it would actually transform the attached test case? There does not appear to be any `FrameIndex` in the attached test case. So in addition to a missed check for `R0/X0` vs. `PPC::ZERO/PPC::ZERO8` we also have a transformation that says it folds frame offsets, but it does not really care about frame offsets - it just folds arithmetic into the index register.

I am not going to suggest that this be corrected in this patch, but this is something we should be much more diligent with.

The patch LGTM. Thanks for fixing the bug.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77034





More information about the llvm-commits mailing list