From: Jason Ekstrand Date: Mon, 6 May 2019 17:25:29 +0000 (-0500) Subject: intel/nir: Call alu_to_scalar one last time before out-of-ssa X-Git-Tag: upstream/19.3.0~6101 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fde45956327ccc30ef1caba3855bb53c725dcb1;p=platform%2Fupstream%2Fmesa.git intel/nir: Call alu_to_scalar one last time before out-of-ssa A few of our very late passes can end up generating vectors accidentally so we need to get rid of them. The only known case of this is the ffma peephole which generates fneg and fabs as vectors. Currently, they're not a problem because they get turned into fmov which the back-end compiler knows how to handle as a vector. That's about to change. Reviewed-by: Kristian H. Kristensen Acked-by: Alyssa Rosenzweig --- diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 9a4afb4..50d6e48 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -931,6 +931,8 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler, OPT(brw_nir_lower_conversions); + if (is_scalar) + OPT(nir_lower_alu_to_scalar, NULL); OPT(nir_lower_to_source_mods, nir_lower_all_source_mods); OPT(nir_copy_prop); OPT(nir_opt_dce);