[PATCH] D66084: Remove asserts in getLoopGuardBranch

Whitney Tsang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 14:47:42 PDT 2019


Whitney requested changes to this revision.
Whitney added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/Analysis/LoopInfo.cpp:373
+  // Loop should be in rotate form.
+  if (isLoopExiting(Latch))
+    return nullptr;
----------------
You want isLoopExiting(Latch)....so change to if (!isLoopExiting(Latch)) return;

Please undo all your changes to the test cases. 
And add EXPECT_EQ(L->getLoopGuardBranch(), nullptr); to all test cases which has non simplified loops or non rotated loops in LoopInfoTest.cpp.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D66084





More information about the llvm-commits mailing list