glsl/opt_algebraic: Drop -(-x) -> x optimization.

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:39:18 -08:00
committed by Marge Bot
parent 766f551cb5
commit 47657b2ffe

View File

@@ -305,15 +305,6 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
this->mem_ctx = ralloc_parent(ir); this->mem_ctx = ralloc_parent(ir);
switch (ir->operation) { switch (ir->operation) {
case ir_unop_neg:
if (op_expr[0] == NULL)
break;
if (op_expr[0]->operation == ir_unop_neg) {
return op_expr[0]->operands[0];
}
break;
case ir_unop_f2i: case ir_unop_f2i:
case ir_unop_f2u: case ir_unop_f2u:
if (op_expr[0] && op_expr[0]->operation == ir_unop_trunc) { if (op_expr[0] && op_expr[0]->operation == ir_unop_trunc) {