jay: convert to LCSSA

for correctness with loops.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41215>
This commit is contained in:
Alyssa Rosenzweig 2026-04-23 10:40:00 -04:00 committed by Marge Bot
parent fed6b7bea0
commit 5828b66b65

View file

@ -459,6 +459,12 @@ jay_process_nir(const struct intel_device_info *devinfo,
NIR_PASS(_, nir, nir_opt_copy_prop);
NIR_PASS(_, nir, nir_opt_dce);
/* Jay requires LCSSA for correctness reading convergent loop-dependent
* values outside of a divergent loop. Converting to LCSSA inserts the
* required divergent 1-source phi after the loop.
*/
NIR_PASS(_, nir, nir_convert_to_lcssa, true, true);
/* Run divergence analysis at the end */
nir_sweep(nir);
nj_index_ssa_defs(nir);