[all-commits] [llvm/llvm-project] 47d06b: [AMDGPU] Simplify true16 SGPR folding (#226082)

Jay Foad via All-commits all-commits at lists.llvm.org
Thu Sep 24 02:59:00 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47d06b4bf9499135a942a85867ad2c4536676ff6
      https://github.com/llvm/llvm-project/commit/47d06b4bf9499135a942a85867ad2c4536676ff6
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2026-09-24 (Thu, 24 Sep 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
    M llvm/test/CodeGen/AMDGPU/true16-fold.mir

  Log Message:
  -----------
  [AMDGPU] Simplify true16 SGPR folding (#226082)

Rewrite part of the SGPR folding "hack" from #128929 using
getChannelFromSubReg to avoid relying on the exact numbering of subreg
indices.

This also fixes a potential bug when folding a copy with no subreg on
the source operand like `%1:sgpr_lo16 = COPY %0:sgpr_lo16`. The old
implementation would have generated `%0.sub0:sgpr_lo16` which fails
machine verification.

Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>

Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>



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