[PATCH] D150384: [CodeGenPrepare] Fix for using outdated/corrupt LoopInfo

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 14 12:50:30 PDT 2023


efriedma added a comment.

We should probably have code somewhere that calls verify() on the LoopInfo, so we're confident these updates are correct, and to catch future issues.  (If we do it once at the end of CodeGenPrepare, it should be cheap enough to just turn it on with +Asserts?  Or we could stick it under EXPENSIVE_CHECKS, I guess.)



================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:2182
+  if (Loop *L = LI.getLoopFor(StartBlock)) {
+      L->addBasicBlockToLoop(CallBlock, LI);
+      L->addBasicBlockToLoop(EndBlock, LI);
----------------
Wrong indentatation.


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

https://reviews.llvm.org/D150384



More information about the llvm-commits mailing list