[PATCH] D15146: [InstCombine] Look through PHIs, GEPs, IntToPtrs and PtrToInts to expose more constants when comparing GEPs

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 06:02:43 PST 2015


sbaranga marked 6 inline comments as done.
sbaranga added a comment.

Thanks for the review! The new version should fix all the issues pointed out.

-Silviu


================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:861-863
@@ +860,5 @@
+      IntegerType::get(V->getContext(),
+                       DL.getPointerTypeSizeInBits(V->getType()));
+
+  Constant *Index = ConstantInt::getNullValue(IndexType);
+  while (true) {
----------------
Thanks for the catch, this was indeed an issue. Not doing the cast in the first place should fix this.


http://reviews.llvm.org/D15146





More information about the llvm-commits mailing list