freedreno/ir3: use move_load_const pass
authorRob Clark <robdclark@gmail.com>
Tue, 5 Jun 2018 17:42:21 +0000 (13:42 -0400)
committerRob Clark <robdclark@gmail.com>
Tue, 19 Jun 2018 17:02:28 +0000 (13:02 -0400)
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/ir3/ir3_nir.c

index 8f50b2741f0a34a891cd600f641a273d957ba00d..9ada3889eb94e03cc56d5648971b0f8bb613efa6 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "nir/tgsi_to_nir.h"
 
+
 static const nir_shader_compiler_options options = {
                .lower_fpow = true,
                .lower_scmp = true,
@@ -204,6 +205,8 @@ ir3_optimize_nir(struct ir3_shader *shader, nir_shader *s,
 
        OPT_V(s, nir_remove_dead_variables, nir_var_local);
 
+       OPT_V(s, nir_move_load_const);
+
        if (fd_mesa_debug & FD_DBG_DISASM) {
                debug_printf("----------------------\n");
                nir_print_shader(s, stdout);