[PATCH] D99252: [LoopFlatten] Fix invalid assertion (PR49571)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 03:09:02 PDT 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopFlatten.cpp:181
+  if (InductionPHI->getIncomingValueForBlock(Latch) != Increment) {
+    LLVM_DEBUG(dbgs() << "PHI value is not increment inst");
+    return false;
----------------
The message seems a bit confusing, perhaps it should say `Incoming value from latch is not the increment inst`?


================
Comment at: llvm/test/Transforms/LoopFlatten/pr49571.ll:3
+
+; CHECK-LABEL: @main
+
----------------
given that the test is very simple, I think it would be better to explicitly check the full output. Also, it would be helpful if you could add a comment explaining what scenario this tests


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99252



More information about the llvm-commits mailing list