glsl/opt_algebraic: drop fsat(fadd(b2f(x), b2f(y))) -> b2f(ior(x, y)) opt.

No change on freedreno shader-db.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475>
This commit is contained in:
Emma Anholt
2023-02-22 11:45:20 -08:00
committed by Marge Bot
parent 144b61437a
commit 71c0c73f8e

View File

@@ -305,18 +305,6 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
this->mem_ctx = ralloc_parent(ir);
switch (ir->operation) {
case ir_unop_saturate:
if (op_expr[0] && op_expr[0]->operation == ir_binop_add) {
ir_expression *b2f_0 = op_expr[0]->operands[0]->as_expression();
ir_expression *b2f_1 = op_expr[0]->operands[1]->as_expression();
if (b2f_0 && b2f_0->operation == ir_unop_b2f &&
b2f_1 && b2f_1->operation == ir_unop_b2f) {
return b2f(logic_or(b2f_0->operands[0], b2f_1->operands[0]));
}
}
break;
/* This macro CANNOT use the do { } while(true) mechanism because
* then the breaks apply to the loop instead of the switch!
*/