[all-commits] [llvm/llvm-project] 215e61: [AMDGPU][SDAG] Add ISD::PTRADD DAG combines (#142739)

Fabian Ritter via All-commits all-commits at lists.llvm.org
Thu Jun 26 00:40:26 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 215e61c08847cd74affe8f90996733f7218c29ad
      https://github.com/llvm/llvm-project/commit/215e61c08847cd74affe8f90996733f7218c29ad
  Author: Fabian Ritter <fabian.ritter at amd.com>
  Date:   2025-06-26 (Thu, 26 Jun 2025)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.h
    M llvm/test/CodeGen/AArch64/cpa-selectiondag.ll
    M llvm/test/CodeGen/AMDGPU/ptradd-sdag-optimizations.ll
    A llvm/test/CodeGen/AMDGPU/ptradd-sdag-undef-poison.ll

  Log Message:
  -----------
  [AMDGPU][SDAG] Add ISD::PTRADD DAG combines (#142739)

This patch focuses on generic DAG combines, plus an AMDGPU-target-specific one
that is closely connected.

The generic DAG combine is based on a part of PR #105669 by rgwott, which was
adapted from work by jrtc27, arichardson, davidchisnall in the CHERI/Morello
LLVM tree. I added some parts and removed several disjuncts from the
reassociation condition:
- `isNullConstant(X)`, since there are address spaces where 0 is a perfectly
  normal value that shouldn't be treated specially,
- `(YIsConstant && ZOneUse)` and `(N0OneUse && ZOneUse && !ZIsConstant)`, since
  they cause regressions in AMDGPU.

For SWDEV-516125.



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