dcoughlin requested changes to this revision. dcoughlin added a reviewer: dcoughlin. This revision now requires changes to proceed.
================ Comment at: lib/Analysis/CFG.cpp:2986 @@ -2985,3 +2985,1 @@ - if (!KnownVal.isFalse()) { - // Add an intermediate block between the BodyBlock and the ---------------- You need to keep this check so that the optimized CFG still removes edges that are trivially known to be false. ================ Comment at: lib/Analysis/CFG.cpp:2994 @@ -2993,3 @@ - Succ = BodyBlock; - CFGBlock *LoopBackBlock = createBlock(); - LoopBackBlock->setLoopTarget(D); ---------------- To keep the unoptimized and optimized blocks in sync, this block creation needs to be done regardless of whether the branch condition is known to be false. My advice would be to hoist the creation (and the FIXME comments) to above the check for whether KnownVal is false. https://reviews.llvm.org/D24759 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits