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

Matt Arsenault via All-commits all-commits at lists.llvm.org
Thu May 29 10:44: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: 83141b861bbf17afd284d0b5fcd5b129bea5aa29
      https://github.com/llvm/llvm-project/commit/83141b861bbf17afd284d0b5fcd5b129bea5aa29
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-05-29 (Thu, 29 May 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



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