From: Lionel Landwerlin Date: Thu, 16 Nov 2023 19:24:31 +0000 (+0200) Subject: intel/fs: rerun divergence analysis prior to convert_from_ssa X-Git-Tag: upstream/23.3.3~202 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f80e96eb26def1862020f669e2ca4e7cf9061431;p=platform%2Fupstream%2Fmesa.git intel/fs: rerun divergence analysis prior to convert_from_ssa Signed-off-by: Lionel Landwerlin Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9964 Cc: mesa-stable Reviewed-by: Ian Romanick Part-of: (cherry picked from commit 6dbb5f1e07b11be0cc6ac764bf1b51feaa7fa623) --- diff --git a/.pick_status.json b/.pick_status.json index 8a0c109a699..d53c5e1a2e0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1064,7 +1064,7 @@ "description": "intel/fs: rerun divergence analysis prior to convert_from_ssa", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 3ef61403616..8da98b0fbfd 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -1734,6 +1734,13 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler, nir_validate_ssa_dominance(nir, "before nir_convert_from_ssa"); + /* Rerun the divergence analysis before convert_from_ssa as this pass has + * some assert on consistent divergence flags. + */ + NIR_PASS(_, nir, nir_convert_to_lcssa, true, true); + NIR_PASS_V(nir, nir_divergence_analysis); + OPT(nir_opt_remove_phis); + OPT(nir_convert_from_ssa, true); if (!is_scalar) {