Revert "nir: Add a couple trivial abs optimizations"

These were already added in 9fdaeb7776 ("nir: add min/max optimisation"),
and there's no point in doing them twice.

This reverts commit e4d346c86d.

Fixes: e4d346c86d ("nir: Add a couple trivial abs optimizations")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3786>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3786>
(cherry picked from commit 0c1ba69a27)
This commit is contained in:
Erik Faye-Lund 2020-02-12 12:48:37 +01:00 committed by Dylan Baker
parent 1c0b76a382
commit 6aacd69a02
2 changed files with 1 additions and 3 deletions

View file

@ -103,7 +103,7 @@
"description": "Revert \"nir: Add a couple trivial abs optimizations\"",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "e4d346c86db0ae332fcdf55eac0e075cfb99a7eb"
},

View file

@ -497,8 +497,6 @@ optimizations.extend([
(('umin', ('umin', a, b), b), ('umin', a, b)),
(('imin', ('imin', a, b), b), ('imin', a, b)),
(('iand@32', a, ('inot', ('ishr', a, 31))), ('imax', a, 0)),
(('fmax', a, ('fneg', a)), ('fabs', a)),
(('imax', a, ('ineg', a)), ('iabs', a)),
(('fmin', a, ('fneg', a)), ('fneg', ('fabs', a))),
(('imin', a, ('ineg', a)), ('ineg', ('iabs', a))),
(('fmin', a, ('fneg', ('fabs', a))), ('fneg', ('fabs', a))),