From 3cffcc3da735bbdc0118c42752dc28d5415dfc6d Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 4 Dec 2024 13:36:04 +0000 Subject: [PATCH] aco: don't CSE p_shader_cycles_hi_lo_hi Signed-off-by: Rhys Perry Reviewed-by: Georg Lehmann Fixes: fae2a85d57a4 ("aco/gfx12: implement subgroup shader clock") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12243 (cherry picked from commit ab26b99c2c87fc38f599e48732c0f8d38732ba97) Part-of: --- .pick_status.json | 2 +- src/amd/compiler/aco_opt_value_numbering.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index f56c334c4c3..9db3e5edea6 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -124,7 +124,7 @@ "description": "aco: don't CSE p_shader_cycles_hi_lo_hi", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "fae2a85d57a49bfbd4efb05ea1d4e53071c2ffd2", "notes": null diff --git a/src/amd/compiler/aco_opt_value_numbering.cpp b/src/amd/compiler/aco_opt_value_numbering.cpp index d5be9e9302d..4ce7e027e64 100644 --- a/src/amd/compiler/aco_opt_value_numbering.cpp +++ b/src/amd/compiler/aco_opt_value_numbering.cpp @@ -313,6 +313,7 @@ can_eliminate(aco_ptr& instr) if (instr->definitions.empty() || instr->opcode == aco_opcode::p_phi || instr->opcode == aco_opcode::p_linear_phi || instr->opcode == aco_opcode::p_pops_gfx9_add_exiting_wave_id || + instr->opcode == aco_opcode::p_shader_cycles_hi_lo_hi || instr->definitions[0].isNoCSE()) return false;