[PATCH] D19276: folding compares if pointers do not escape
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 19 13:14:11 PDT 2016
mcrosier added a subscriber: mcrosier.
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:1871
@@ +1870,3 @@
+ LoadInst *LI = cast<LoadInst>(CmpOp);
+ // comparison to global pointer
+ if (isa<GlobalVariable>(LI->getPointerOperand()))
----------------
sanjoy wrote:
> Nit: Capitalization in comment.
Please include a period as well.
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:1913
@@ +1912,3 @@
+ CmpOp1 = CmpOp0;
+ // we fold comparisons in some conditions provided the alloc has not
+ // escaped
----------------
sanjoy wrote:
> Nit: capitalize comment
Please include a period as well.
Repository:
rL LLVM
http://reviews.llvm.org/D19276
More information about the llvm-commits
mailing list