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 <hoegsberg@google.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Jason Ekstrand 2019-05-06 12:25:29 -05:00
parent ddd08e1888
commit 4fde459563
1 changed files with 2 additions and 0 deletions

View File

@ -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);