[PATCH] D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 7 21:41:35 PST 2018
mkazantsev marked 3 inline comments as done.
mkazantsev added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopSimplifyCFG.cpp:288
+ foldTerminators();
+
+ return true;
----------------
anna wrote:
> mkazantsev wrote:
> > anna wrote:
> > > We need a bunch of asserts here:
> > > 1. assert that L.getHeader() is reachableFromEntry.
> > > 2. assert that LI is correct (mentioned in earlier comment).
> > AFAIK reachibility of header is implied by correctness of LI. Will do.
> I checked, but LI.verify() doesn't contain that check for header is reachableFromEntry. We recompute a new LI and then verify original LI and the recomputed one is the same.
Both things are asserted now.
https://reviews.llvm.org/D54021
More information about the llvm-commits
mailing list