Module: Mesa Branch: main Commit: b33aa7b01a2240f6eca0bc7082640ec9a5f1fa6a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b33aa7b01a2240f6eca0bc7082640ec9a5f1fa6a
Author: Georg Lehmann <dadschoo...@gmail.com> Date: Sat Nov 4 11:01:41 2023 +0100 aco: don't CSE v_permlane across exec With bc=1 and fi=0 it needs to return 0 for inactive lanes. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26045> --- src/amd/compiler/aco_opt_value_numbering.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/amd/compiler/aco_opt_value_numbering.cpp b/src/amd/compiler/aco_opt_value_numbering.cpp index f939466f3cf..acf032fd1c4 100644 --- a/src/amd/compiler/aco_opt_value_numbering.cpp +++ b/src/amd/compiler/aco_opt_value_numbering.cpp @@ -166,15 +166,17 @@ struct InstrPred { } } - if (a->opcode == aco_opcode::v_readfirstlane_b32) - return a->pass_flags == b->pass_flags; - if (a->isVALU()) { VALU_instruction& aV = a->valu(); VALU_instruction& bV = b->valu(); if (aV.abs != bV.abs || aV.neg != bV.neg || aV.clamp != bV.clamp || aV.omod != bV.omod || aV.opsel != bV.opsel || aV.opsel_lo != bV.opsel_lo || aV.opsel_hi != bV.opsel_hi) return false; + + if (a->opcode == aco_opcode::v_permlane16_b32 || + a->opcode == aco_opcode::v_permlanex16_b32 || + a->opcode == aco_opcode::v_readfirstlane_b32) + return aV.pass_flags == bV.pass_flags; } if (a->isDPP16()) { DPP16_instruction& aDPP = a->dpp16();