[PATCH] D73129: [LoopUnrollAndJam] Correctly update LoopInfo when unroll and jam more than 2-levels loop nests.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 06:05:48 PST 2020


dmgreen added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp:617
+  if (CompletelyUnroll)
+    LI->erase(L);
+
----------------
I think the #ifndef NDEBUG checks below will re-use L after it has been deleted.


================
Comment at: llvm/test/Transforms/LoopUnrollAndJam/loopnest.ll:6
+; CHECK-LABEL: foo
+; CHECK: %i = phi i64 [ 0, %entry ], [ %inc.i.3, %for.i.latch ]
+
----------------
Whitney wrote:
> jdoerfert wrote:
> > I would generate the check lines with the update_checks script. This doesn't test much.
> I tried to follow the same pattern as the other unroll and jam lit tests.  The main purpose of this test is to check if loop info verified correctly. I will update the test with check lines generated by use update_checks script.
Maybe just show control flow, like the test that was changed below?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73129





More information about the llvm-commits mailing list