[PATCH] D143897: [CodeGenPrepare] Estimate liveness of loop invariants when checking for address folding profitability

NAKAMURA Takumi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 02:38:53 PDT 2023


chapuni added a comment.

This discovers unstable behavior.
For me, MCA/ResourceManaget.o sometimes differs.
Reproduced by stage1 clang.

Something sensitive might be in LoopInfo.



================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:5106
+  BasicBlock *BB = MemoryInst->getParent();
+  if (Loop *L = LI.getLoopFor(BB);
+      L && L->isLoopInvariant(Val) && isUsedInLoop(Val, L))
----------------
L is unstable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143897



More information about the llvm-commits mailing list