[PATCH] D30161: [LoopPeeling] Peel loops with invariant backedge Phi input

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 22:46:45 PST 2017


mkuper added inline comments.


================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:113
+  // invariant instead of this Phi.
+  if (L->getNumBackEdges() == 1) {
+    BasicBlock *Header = L->getHeader();
----------------
Can you just use L->getLoopLatch()? Or is that different from what you're looking for?


https://reviews.llvm.org/D30161





More information about the llvm-commits mailing list