[PATCH] D19276: folding compares if pointers do not escape
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 20 13:55:09 PDT 2016
majnemer added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:1904
@@ +1903,3 @@
+
+ if (!isa<ConstantPointerNull>(ICI->getOperand(1))) {
+ unsigned OtherIndex = (ICI->getOperand(0) == PI)? 1:0;
----------------
Could you handle this case in isNeverEqualToUnescapedAlloc by changing it's prototype to be a `Value *` instead of an `Instruction *`?
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:1905
@@ +1904,3 @@
+ if (!isa<ConstantPointerNull>(ICI->getOperand(1))) {
+ unsigned OtherIndex = (ICI->getOperand(0) == PI)? 1:0;
+ Instruction *OtherOp = dyn_cast<Instruction>(ICI->getOperand(OtherIndex));
----------------
Please clang-format this line.
http://reviews.llvm.org/D19276
More information about the llvm-commits
mailing list