From 4fde45956327ccc30ef1caba3855bb53c725dcb1 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 6 May 2019 12:25:29 -0500 Subject: 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 --- src/intel/compiler/brw_nir.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/intel/compiler/brw_nir.c') diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 9a4afb4b778..50d6e48f50d 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); -- cgit v1.2.3