r600/sfn: check number of fsat64 source uses properly

Fixes: 255eee10ac
    r600/sfn: Implement fsat for 64 bit ops

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36585>
(cherry picked from commit 67d0f51029)
This commit is contained in:
Gert Wollny 2025-06-20 22:16:18 +02:00 committed by Eric Engestrom
parent ed57718090
commit 410937d8e8
2 changed files with 4 additions and 7 deletions

View file

@ -4014,7 +4014,7 @@
"description": "r600/sfn: check number of fsat64 source uses properly",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "255eee10ace253d61570d9b97b44158082ae8de4",
"notes": null

View file

@ -1979,6 +1979,9 @@ emit_alu_abs64(const nir_alu_instr& alu, Shader& shader)
static bool
try_propagat_fsat64(const nir_alu_instr& alu, Shader& shader)
{
if (list_length(&alu.src[0].src.ssa->uses) > 1)
return false;
auto& value_factory = shader.value_factory();
auto src0 = value_factory.src64(alu.src[0], 0, 0);
auto reg0 = src0->as_register();
@ -1988,12 +1991,6 @@ try_propagat_fsat64(const nir_alu_instr& alu, Shader& shader)
if (!reg0->has_flag(Register::ssa))
return false;
if (reg0->parents().size() != 1)
return false;
if (!reg0->uses().empty())
return false;
auto parent = (*reg0->parents().begin())->as_alu();
if (!parent)
return false;