diff options
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_search_helpers.h | 16 |
2 files changed, 0 insertions, 19 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index b95d544d555..00750fff08a 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -1128,9 +1128,6 @@ late_optimizations = [ (('~flrp@32', ('fadd(is_used_once)', a, b), ('fadd(is_used_once)', a, c), d), ('fadd', ('flrp', b, c, d), a)), (('~flrp@64', ('fadd(is_used_once)', a, b), ('fadd(is_used_once)', a, c), d), ('fadd', ('flrp', b, c, d), a)), - (('b2f(is_used_more_than_once)', ('inot', 'a@1')), ('bcsel', a, 0.0, 1.0)), - (('fneg(is_used_more_than_once)', ('b2f', ('inot', 'a@1'))), ('bcsel', a, -0.0, -1.0)), - (('~fadd@32', 1.0, ('fmul(is_used_once)', c , ('fadd', b, -1.0 ))), ('fadd', ('fadd', 1.0, ('fneg', c)), ('fmul', b, c)), 'options->lower_flrp32'), (('~fadd@64', 1.0, ('fmul(is_used_once)', c , ('fadd', b, -1.0 ))), ('fadd', ('fadd', 1.0, ('fneg', c)), ('fmul', b, c)), 'options->lower_flrp64'), diff --git a/src/compiler/nir/nir_search_helpers.h b/src/compiler/nir/nir_search_helpers.h index 91d638a488f..dd220dfdffd 100644 --- a/src/compiler/nir/nir_search_helpers.h +++ b/src/compiler/nir/nir_search_helpers.h @@ -144,22 +144,6 @@ is_not_const(nir_alu_instr *instr, unsigned src, UNUSED unsigned num_components, } static inline bool -is_used_more_than_once(nir_alu_instr *instr) -{ - bool zero_if_use = list_empty(&instr->dest.dest.ssa.if_uses); - bool zero_use = list_empty(&instr->dest.dest.ssa.uses); - - if (zero_use && zero_if_use) - return false; - else if (zero_use && list_is_singular(&instr->dest.dest.ssa.if_uses)) - return false; - else if (zero_if_use && list_is_singular(&instr->dest.dest.ssa.uses)) - return false; - - return true; -} - -static inline bool is_used_once(nir_alu_instr *instr) { bool zero_if_use = list_empty(&instr->dest.dest.ssa.if_uses); |