[Mesa-dev] [PATCH 17/28] intel/nir: call nir_opt_constant_folding before nir_opt_algebraic is executed

Samuel Iglesias Gonsálvez siglesias at igalia.com
Wed Dec 5 15:55:32 UTC 2018


This would do constant folding and also flush to zero denorms operands before
the nir_opt_algebraic is executed.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
---
 src/intel/compiler/brw_nir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index 0a5aa35c700..600f7a97df9 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -570,8 +570,8 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
       OPT(nir_opt_cse);
       OPT(nir_opt_peephole_select, 0);
       OPT(nir_opt_intrinsics);
-      OPT(nir_opt_algebraic);
       OPT(nir_opt_constant_folding);
+      OPT(nir_opt_algebraic);
       OPT(nir_opt_dead_cf);
       if (OPT(nir_opt_trivial_continues)) {
          /* If nir_opt_trivial_continues makes progress, then we need to clean
-- 
2.19.1



More information about the mesa-dev mailing list