[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
Tue Jan 5 09:04:10 PST 2016


haicheng added inline comments.

================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1949
@@ +1948,3 @@
+      if (isa<ConstantInt>(PN->getIncomingValue(i)))
+        HasConst = true;
+    }
----------------
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.


Repository:
  rL LLVM

http://reviews.llvm.org/D15508





More information about the llvm-commits mailing list