[all-commits] [llvm/llvm-project] c216ac: AMDGPU: Correctly handle folding immediates into s...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Mar 4 08:13:58 PST 2025


  Branch: refs/heads/users/arsenm/amdgpu/fix-fold-operands-immediate-handling-subreg-uses
  Home:   https://github.com/llvm/llvm-project
  Commit: c216acd8ec93514717688d8542777fad73200727
      https://github.com/llvm/llvm-project/commit/c216acd8ec93514717688d8542777fad73200727
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-03-04 (Tue, 04 Mar 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
    M llvm/test/CodeGen/AMDGPU/si-fold-operands-subreg-imm.mir

  Log Message:
  -----------
  AMDGPU: Correctly handle folding immediates into subregister use operands

This fixes a miscompile where a 64-bit materialize incorrectly folds into
a sub1 use operand.

We currently do not see many subregister use operands. Incidentally,
there are also SIFoldOperands bugs that prevent this fold from
appearing here. Pre-fix folding of 32-bit subregister uses from 64-bit
materializes, in preparation for future patches.

The existing APIs are awkward since they expect to have a fully formed
instruction with operands to use, and not something new which needs
to be created.



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