r00/sfn: Fix copy propagation into buffer load address

A buffer load can not use an indirect register as address.

Fixes: 79ca456b48 ("r600/sfn: rewrite NIR backend")

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36488>
(cherry picked from commit 874005aeb7)
This commit is contained in:
Gert Wollny 2025-07-31 17:16:45 +02:00 committed by Eric Engestrom
parent 51de5181d1
commit af62d027d3
2 changed files with 3 additions and 1 deletions

View file

@ -3614,7 +3614,7 @@
"description": "r00/sfn: Fix copy propagation into buffer load address",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "79ca456b4837b3bc21cf9ef3c03c505c4b4909f6",
"notes": null

View file

@ -124,6 +124,8 @@ FetchInstr::replace_source(PRegister old_src, PVirtualValue new_src)
bool success = false;
auto new_reg = new_src->as_register();
if (new_reg) {
if (!new_reg->has_flag(Register::ssa) && new_reg->addr())
return false;
if (old_src->equal_to(*m_src)) {
m_src->del_use(this);
m_src = new_reg;