From d15b5fadbbe189026ad02a0885fccf1d8b22ab06 Mon Sep 17 00:00:00 2001 From: Mel Henning Date: Sat, 31 May 2025 12:26:16 -0400 Subject: [PATCH] nir/divergence_analysis: Update LCSSA comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Daniel Schürmann Part-of: --- src/compiler/nir/nir_divergence_analysis.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_divergence_analysis.c b/src/compiler/nir/nir_divergence_analysis.c index 47dda4ec134..409e82ac404 100644 --- a/src/compiler/nir/nir_divergence_analysis.c +++ b/src/compiler/nir/nir_divergence_analysis.c @@ -28,7 +28,9 @@ * That is, the variable has the same value for all invocations * of the group. * - * This divergence analysis pass expects the shader to be in LCSSA-form. + * If the shader is not in LCSSA-form, passes need to use nir_src_is_divergent() + * instead of reading the value from src->ssa->divergent as without LCSSA a src + * can have a different divergence than the corresponding SSA-def. * * This algorithm implements "The Simple Divergence Analysis" from * Diogo Sampaio, Rafael De Souza, Sylvain Collange, Fernando Magno Quintão Pereira.