From ab7a9b4538355946c1947546d2b9f2b10724e335 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Wed, 22 Feb 2023 11:56:08 -0800 Subject: [PATCH] glsl/opt_algebraic: Drop rcp optimizations. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit No change on freedreno shader-db. Acked-by: Timothy Arceri Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl/opt_algebraic.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/compiler/glsl/opt_algebraic.cpp b/src/compiler/glsl/opt_algebraic.cpp index 8949fa2..bc9c96b 100644 --- a/src/compiler/glsl/opt_algebraic.cpp +++ b/src/compiler/glsl/opt_algebraic.cpp @@ -696,26 +696,6 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir) break; - case ir_unop_rcp: - if (op_expr[0] && op_expr[0]->operation == ir_unop_rcp) - return op_expr[0]->operands[0]; - - if (op_expr[0] && (op_expr[0]->operation == ir_unop_exp2 || - op_expr[0]->operation == ir_unop_exp)) { - return new(mem_ctx) ir_expression(op_expr[0]->operation, ir->type, - neg(op_expr[0]->operands[0])); - } - - if (op_expr[0] && op_expr[0]->operation == ir_unop_rsq) - return sqrt(op_expr[0]->operands[0]); - - /* As far as we know, all backends are OK with rsq. */ - if (op_expr[0] && op_expr[0]->operation == ir_unop_sqrt) { - return rsq(op_expr[0]->operands[0]); - } - - break; - case ir_triop_fma: /* Operands are op0 * op1 + op2. */ if (is_vec_zero(op_const[0]) || is_vec_zero(op_const[1])) { -- 2.7.4