Mesa (main): nir/algebraic: optimize bcsel(c, fsin/cos_amd(a), fsin/cos_amd(b))

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 7 23:01:08 UTC 2022


Module: Mesa
Branch: main
Commit: bc1ea2fda919e5771bffa49c0503859886f7c3fd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc1ea2fda919e5771bffa49c0503859886f7c3fd

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Mon May  3 10:55:39 2021 +0100

nir/algebraic: optimize bcsel(c, fsin/cos_amd(a), fsin/cos_amd(b))

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10587>

---

 src/compiler/nir/nir_opt_algebraic.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index 73ee5d419d6..9ab8542b0ff 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -2426,7 +2426,7 @@ for op in ['fpow']:
         (('bcsel', a, (op, b, c), (op + '(is_used_once)', d, c)), (op, ('bcsel', a, b, d), c)),
     ]
 
-for op in ['frcp', 'frsq', 'fsqrt', 'fexp2', 'flog2', 'fsign', 'fsin', 'fcos', 'fneg', 'fabs', 'fsign']:
+for op in ['frcp', 'frsq', 'fsqrt', 'fexp2', 'flog2', 'fsign', 'fsin', 'fcos', 'fsin_amd', 'fcos_amd', 'fneg', 'fabs', 'fsign']:
     optimizations += [
         (('bcsel', c, (op + '(is_used_once)', a), (op + '(is_used_once)', b)), (op, ('bcsel', c, a, b))),
     ]



More information about the mesa-commit mailing list