[all-commits] [llvm/llvm-project] 6e0dcf: AMDGPU: Add pseudoinstruction for agpr or vgpr con...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Thu Mar 6 01:48:03 PST 2025
Branch: refs/heads/users/arsenm/amdgpu/add-av-mov-b32-pseudo
Home: https://github.com/llvm/llvm-project
Commit: 6e0dcf534bf951883b23d59fac60c0f7a6713faf
https://github.com/llvm/llvm-project/commit/6e0dcf534bf951883b23d59fac60c0f7a6713faf
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2025-03-06 (Thu, 06 Mar 2025)
Changed paths:
M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
M llvm/lib/Target/AMDGPU/SIInstructions.td
A llvm/test/CodeGen/AMDGPU/av_movimm_pseudo_expansion.mir
M llvm/test/CodeGen/AMDGPU/fold-imm-copy.mir
A llvm/test/CodeGen/AMDGPU/inflate-av-remat-imm.mir
M llvm/test/CodeGen/AMDGPU/peephole-fold-imm.mir
M llvm/test/CodeGen/AMDGPU/splitkit-do-not-undo-subclass-split-with-remat.mir
M llvm/test/CodeGen/AMDGPU/vgpr-remat.mir
A llvm/test/MachineVerifier/AMDGPU/verify-av-mov-imm-pseudo.mir
Log Message:
-----------
AMDGPU: Add pseudoinstruction for agpr or vgpr constants
Currently constants are materialized with v_mov_b32, which
may fold into v_accvgpr_write_b32 if it happens to be copied
into an AGPR use. This is fine until the register allocator
wants to introduce temporary registers using the combined AV_
superclasses. Since each of these instructions is restricted to
writing the specific subclass, they block instances where
we could inflate the use register class. As v_accvgpr_write_b32 cannot
use a literal constant, only inline immediate values should be used
with the pseudo.
Introduce a pseudo with a flexible result register class. Alternatively
we would need to teach allocation about how to rewrite or rematerialize
with a change of opcode which would require a lot more machinery.
We may want a 64-bit variant, just in case we can make use of v_mov_b64.
This does not yet attempt to make use of it, and only adds the boilerplate
and tests on basic optimizations.
Commit: 9081a0a886661267e03781b35ca6e89b3b7fc45b
https://github.com/llvm/llvm-project/commit/9081a0a886661267e03781b35ca6e89b3b7fc45b
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2025-03-06 (Thu, 06 Mar 2025)
Changed paths:
M llvm/test/CodeGen/AMDGPU/fold-imm-copy.mir
Log Message:
-----------
Add broken tests from preexisting failure
Compare: https://github.com/llvm/llvm-project/compare/6e0dcf534bf9%5E...9081a0a88666
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