[PATCH] D113343: [InstSimplify] Remove incorrect icmp of gep fold (PR52429)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 6 04:59:00 PDT 2021


nikic created this revision.
nikic added reviewers: nlopes, spatel, lebedev.ri, aqjune.
Herald added a subscriber: hiraditya.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

As described in https://bugs.llvm.org/show_bug.cgi?id=52429 this fold is incorrect, because inbounds only guarantees that the pointers don't wrap in the unsigned space, it is possible that the sign boundary is crossed by an object.

I'm dropping the fold entirely rather than adjusting it, because computePointerICmp() fully subsumes it (with correct predicate handling).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113343

Files:
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/test/Transforms/InstCombine/icmp-custom-dl.ll
  llvm/test/Transforms/InstCombine/icmp.ll
  llvm/test/Transforms/InstSimplify/compare.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113343.385264.patch
Type: text/x-patch
Size: 5644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211106/52638012/attachment.bin>


More information about the llvm-commits mailing list