[all-commits] [llvm/llvm-project] 261580: [InstSimplify] Support non-inbounds GEP in ptrdiff...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Oct 10 01:03:46 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 261580cacd0be842ab62466193a385384a95c61a
      https://github.com/llvm/llvm-project/commit/261580cacd0be842ab62466193a385384a95c61a
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2025-10-10 (Fri, 10 Oct 2025)

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

  Log Message:
  -----------
  [InstSimplify] Support non-inbounds GEP in ptrdiff fold (#162676)

We can fold ptrdiff(ptradd(p, x), p) to x regardless of whether the
ptradd is inbounds.

Proof: https://alive2.llvm.org/ce/z/Xuvc7N



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