Mesa (staging/20.0): Revert "nir: Add a couple trivial abs optimizations"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 13 19:01:46 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: 6aacd69a027a162c7c5374a4169c253135588e2c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6aacd69a027a162c7c5374a4169c253135588e2c

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Feb 12 12:48:37 2020 +0100

Revert "nir: Add a couple trivial abs optimizations"

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

This reverts commit e4d346c86db0ae332fcdf55eac0e075cfb99a7eb.

Fixes: e4d346c86db ("nir: Add a couple trivial abs optimizations")
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Ian Romanick <ian.d.romanick at 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 0c1ba69a27090d3ef000943b47468705fe0454c4)

---

 .pick_status.json                     | 2 +-
 src/compiler/nir/nir_opt_algebraic.py | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index be815567586..6e3638749b3 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -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"
     },
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index 904b02e0309..94c8836cbf7 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -497,8 +497,6 @@ optimizations.extend([
    (('umin', ('umin', a, b), b), ('umin', a, b)),
    (('imin', ('imin', a, b), b), ('imin', a, b)),
    (('iand at 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))),



More information about the mesa-commit mailing list