https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127485

            Bug ID: 127485
           Summary: VRP misses that if the difference between two values
                    is non-zero then the two values are different
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Created attachment 65634
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65634&action=edit
testcase

With the testcase, since the range of diff does not include 0, then we know
that x cannot be the same as y.  This is true for both wrapping and overflow
being undefined case.

I think this might be fixed by
https://gcc.gnu.org/pipermail/gcc-patches/2026-September/730734.html or maybe a
follow up.

Note I am filing this more because of the LLVM issue
(https://github.com/llvm/llvm-project/issues/223345) that was filed.

Reply via email to