From bc1ea2fda919e5771bffa49c0503859886f7c3fd Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 3 May 2021 10:55:39 +0100 Subject: [PATCH] nir/algebraic: optimize bcsel(c, fsin/cos_amd(a), fsin/cos_amd(b)) Signed-off-by: Rhys Perry Reviewed-by: Samuel Pitoiset Part-of: --- 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))), ]