[PATCH] D22779: Clone block with icmp+branch if it likely results in further jump threading
Haicheng Wu via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 18 09:58:27 PDT 2016
haicheng added a comment.
Hi Easwaran,
Please see the inlined comment.
Haicheng
================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:903-904
@@ +902,4 @@
+ for (auto *Pred : predecessors(BB)) {
+ if (LVI->getConstantOnEdge(Cond, Pred, BB) &&
+ TryDuplicatePredsWithUncondBranch(BB))
+ return true;
----------------
If I understand it correctly, the predecessor that TryDuplicatePredsWithUncondBranch() finds is the first predecessor that has an unconditional branch. It may not be Pred here which can provide a constant condition.
https://reviews.llvm.org/D22779
More information about the llvm-commits
mailing list