[PATCH] D16240: [InstCombine] Simplify a known nonzero incoming value of PHI

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 09:11:09 PST 2016


sanjoy added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombinePHI.cpp:940
@@ +939,3 @@
+        BasicBlock *InBB = PN.getIncomingBlock(i);
+        Instruction *CtxI = (InBB && InBB->getTerminator())
+                                ? (Instruction *)InBB->getTerminator()
----------------
I think `InBB` will always be non-null and have a terminator in a valid CFG.  Have you seen otherwise?


http://reviews.llvm.org/D16240





More information about the llvm-commits mailing list