[all-commits] [llvm/llvm-project] 06282d: [SeparateConstOffsetFromGEP] Update splitGEP to ha...

Adel Ejjeh via All-commits all-commits at lists.llvm.org
Thu Feb 12 13:13:17 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 06282d9c46264c358b6e7ecc301305cdd7049e59
      https://github.com/llvm/llvm-project/commit/06282d9c46264c358b6e7ecc301305cdd7049e59
  Author: Adel Ejjeh <adel.ejjeh at amd.com>
  Date:   2026-02-12 (Thu, 12 Feb 2026)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
    A llvm/test/Transforms/SeparateConstOffsetFromGEP/AMDGPU/amdgpu-large-lds-offset.ll

  Log Message:
  -----------
  [SeparateConstOffsetFromGEP] Update splitGEP to handle case where including base offset results in an offset that's too large (#177653)

Currently, separate-const-offset-from-gep tries to combine both the
offsets on the base address and the offsets on the current GEP itself
when it tries to separate constant offsets. This results in the pass
failing to separate the offset in cases where the base address has a
large offset that would cause the total offset to be larger than what
the back-end can represent for the respective addressing mode. However,
in many cases we can still benefit from extracting the offset of the GEP
without including the offset from the base-address-GEP when the
base-address is used in multiple different places to help reduce
register pressure and recalculating the base address.

This PR addresses the above by re-trying without accumulating the offset
from the base-address GEP included if isLegalAddressingMode returns
false the first time.



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