From 17c95e070cd93bfc33719c9569c6a543e4d95866 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 10 Aug 2023 17:05:58 +0200 Subject: [PATCH] r600/sfn: work around injecting extra CF's to handle hardware bugs The clause local registers can't be used if a new CF is started, but the assembler still may introduce a CFs to work around some hardware bug, so make sure RA doesn't assume that the predicate ALU op is in the same ALU CF like the ALU ops before. This is a hotfix, the scheduler should handle this better. Fixes: cfbd1fd41300740154f89b4382e4790e61c1bf0b r600/sfn: Use clause local registers in RA Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/sfn/sfn_liverangeevaluator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/r600/sfn/sfn_liverangeevaluator.cpp b/src/gallium/drivers/r600/sfn/sfn_liverangeevaluator.cpp index f551aaa..13e2955 100644 --- a/src/gallium/drivers/r600/sfn/sfn_liverangeevaluator.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_liverangeevaluator.cpp @@ -389,8 +389,11 @@ LiveRangeInstrVisitor::visit(ControlFlowInstr *instr) void LiveRangeInstrVisitor::visit(IfInstr *instr) { + int b = m_block; + m_block = -1; instr->predicate()->accept(*this); scope_if(); + m_block = b; } void -- 2.7.4