[PATCH] D15508: [JumpThreading] Split select that has constant conditions coming from the PHI node
Haicheng Wu via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 4 11:32:20 PST 2016
haicheng added inline comments.
================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1943
@@ +1942,3 @@
+ bool hasConst = false;
+ for (unsigned i = 0; i != NumPHIValues; ++i) {
+ if (PN->getIncomingBlock(i) == BB)
----------------
mssimpso wrote:
> Adding "&& !hasConst" to the terminating condition will break the loop early if you find an incoming constant.
I check if any Incoming block of PHI is not BB itself so that I do not break the loop early.
Repository:
rL LLVM
http://reviews.llvm.org/D15508
More information about the llvm-commits
mailing list