[PATCH] D15508: [JumpThreading] Split select that has constant conditions coming from the PHI node

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 11:11:43 PST 2016


mcrosier added inline comments.

================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1949
@@ +1948,3 @@
+      if (isa<ConstantInt>(PN->getIncomingValue(i)))
+        HasConst = true;
+    }
----------------
haicheng wrote:
> mcrosier wrote:
> > Can't you remove the 'HasConst' bool entirely by returning SI here?  This will also cause the loop to early exit.
> I also check if any Incoming block of PHI is not BB itself so that I do not exit loop early here.
Never mind, just ignore this comment.  (Actually, I thought I deleted the comment before I submitted the review.)


Repository:
  rL LLVM

http://reviews.llvm.org/D15508





More information about the llvm-commits mailing list