[all-commits] [llvm/llvm-project] e675b9: [InstSimplify] Consider `dereferenceable(N)` when ...

Antonio Frighetto via All-commits all-commits at lists.llvm.org
Tue Jun 16 00:28:32 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e675b9fbf06045e246b030789b13e3b794d5e4aa
      https://github.com/llvm/llvm-project/commit/e675b9fbf06045e246b030789b13e3b794d5e4aa
  Author: Antonio Frighetto <me at antoniofrighetto.com>
  Date:   2026-06-16 (Tue, 16 Jun 2026)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/compare.ll

  Log Message:
  -----------
  [InstSimplify] Consider `dereferenceable(N)` when simplifying pointer equalities (#203867)

Extend `computePointerICmp` to leverage `dereferenceable(N)` attribute
when simplifying pointer equality comparisons. Per attribute semantics,
an argument pointer marked as such cannot be a one-past-the-end pointer
to some object, thus it cannot equal the start of an adjacent object.
This lets us prove inequality between a `dereferenceable` argument and
storage allocated within the function.

Fixes: https://github.com/llvm/llvm-project/issues/200511.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list