Unverified Commit 2973febe authored by alex-t's avatar alex-t Committed by GitHub
Browse files

[AMDGPU] Force the third source operand of the MAI instructions to VGPR if no...


[AMDGPU] Force the third source operand of the MAI instructions to VGPR if no AGPRs are used. (#69720)

eaf85b9c28 "[AMDGPU] Select VGPR versions of MFMA if possible" prevents
the compiler from reserving AGPRs if a kernel has no inline asm
explicitly using AGPRs, no calls, and runs at least 2 waves with not
more than 256 VGPRs. This, in turn, makes it impossible to allocate AGPR
if necessary. As a result, regalloc fails in case we have an MAI
instruction that has at least one AGPR operand.
This change checks if we have AGPRs and forces operands to VGPR if we do
not have them.

---------

Co-authored-by: default avatarAlexander Timofeev <alexander.timofeev@amd.com>
parent 25da9bb7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment