[all-commits] [llvm/llvm-project] 2698de: AMDGPU: Fix tracking subreg defs when folding thro...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Wed Jun 25 15:40:09 PDT 2025


  Branch: refs/heads/users/arsenm/issue139317/fix-subreg-of-immediate-tracking-through-reg-sequence
  Home:   https://github.com/llvm/llvm-project
  Commit: 2698de39ec8f4b62a4fbb7a74661e21469b5c5f9
      https://github.com/llvm/llvm-project/commit/2698de39ec8f4b62a4fbb7a74661e21469b5c5f9
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
    M llvm/test/CodeGen/AMDGPU/issue139317-bad-opsel-reg-sequence-fold.ll
    M llvm/test/CodeGen/AMDGPU/si-fold-operands-subreg-imm.gfx942.mir
    M llvm/test/CodeGen/AMDGPU/si-fold-operands-subreg-imm.mir

  Log Message:
  -----------
  AMDGPU: Fix tracking subreg defs when folding through reg_sequence

We weren't fully respecting the type of a def of an immediate vs.
the type at the use point. Refactor the folding logic to track the
value to fold, as well as a subregister to apply to the underlying
value. This is similar to how PeepholeOpt tracks subregisters (though
only for pure copy-like instructions, no constants).

Fixes #139317


  Commit: b7db9172454a2b0d6be817121fc8c04a34d9f555
      https://github.com/llvm/llvm-project/commit/b7db9172454a2b0d6be817121fc8c04a34d9f555
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

  Log Message:
  -----------
  Address comments


Compare: https://github.com/llvm/llvm-project/compare/00ac74283abe...b7db9172454a

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