[all-commits] [llvm/llvm-project] 597f93: AMDGPU: Check if immediate is legal for av_mov_b32...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Sep 26 16:24:41 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 597f93d36b035faeb63f4ba0d61a8b8e25eddaab
      https://github.com/llvm/llvm-project/commit/597f93d36b035faeb63f4ba0d61a8b8e25eddaab
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-09-27 (Sat, 27 Sep 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
    M llvm/test/CodeGen/AMDGPU/fold-imm-copy-agpr.mir
    M llvm/test/CodeGen/AMDGPU/fold-imm-copy.mir
    A llvm/test/CodeGen/AMDGPU/fold-operands-frame-index-agpr.mir

  Log Message:
  -----------
  AMDGPU: Check if immediate is legal for av_mov_b32_imm_pseudo (#160819)

This is primarily to avoid folding a frame index materialized
into an SGPR into the pseudo; this would end up looking like:
  %sreg = s_mov_b32 %stack.0
  %av_32 = av_mov_b32_imm_pseudo %sreg

Which is not useful.

Match the check used for the b64 case. This is limited to the
pseudo to avoid regression due to gfx908's special case - it
is expecting to pass here with v_accvgpr_write_b32 for illegal
cases, and stay in the intermediate state with an sgpr input.

This avoids regressions in a future patch.



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