[all-commits] [llvm/llvm-project] e3cec1: [InstSimplify] Remove incorrect icmp of gep fold (...

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Nov 6 13:03:38 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e3cec17b2db292227a2b92d46e653372dad711af
      https://github.com/llvm/llvm-project/commit/e3cec17b2db292227a2b92d46e653372dad711af
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-11-06 (Sat, 06 Nov 2021)

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

  Log Message:
  -----------
  [InstSimplify] Remove incorrect icmp of gep fold (PR52429)

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 (just with correct predicate
handling).

Differential Revision: https://reviews.llvm.org/D113343




More information about the All-commits mailing list