summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-05-06 12:25:29 -0500
committerJason Ekstrand <[email protected]>2019-05-24 08:38:11 -0500
commit4fde45956327ccc30ef1caba3855bb53c725dcb1 (patch)
tree8f7660f7e24fb57025dcbe0fc74cda2009b01493 /src
parentddd08e1888cfdf7a643b8fa1ce61f77bb66aa3eb (diff)
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 <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/compiler/brw_nir.c2
1 files changed, 2 insertions, 0 deletions
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);