[PATCH] D91730: [RISCV] Add MemOperand to the instruction created by storeRegToStackSlot/loadRegFromStackSlot

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 12:24:44 PST 2020


craig.topper added a comment.

In D91730#2405132 <https://reviews.llvm.org/D91730#2405132>, @lenary wrote:

> Is the code change due to the fact that the optimizer later finally knows that `12(sp)` and `8(sp)` don't overlap?

MachineSinking is moving the fld down. It previously couldn't do it because isSafeToMove returned false because hasOrderedMemoryRef() conservatively returned true due to the missing mem operand.

  // a load across an atomic load with Ordering > Monotonic.
  if (mayStore() || isCall() || isPHI() ||
      (mayLoad() && hasOrderedMemoryRef())) {
    SawStore = true;
    return false;
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91730



More information about the llvm-commits mailing list