[PATCH] D19276: folding compares if pointers do not escape

Anna Thomas via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 13:51:41 PDT 2016


anna marked 5 inline comments as done.

================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:1907
@@ +1906,3 @@
+        if (!isa<ConstantPointerNull>(ICI->getOperand(1))) {
+          Instruction *CmpOp0 = dyn_cast<Instruction>(ICI->getOperand(0));
+          Instruction *CmpOp1;
----------------
sanjoy wrote:
> I'm not sure you need a `dyn_cast<>` here.  Have you tried just having `CmpOp0` be a `Value *`?
cast not needed anymore, direct comparison in ternary condition with `PI`




Repository:
  rL LLVM

http://reviews.llvm.org/D19276





More information about the llvm-commits mailing list