From c3839bd540166abbe2aac2ef39527e2a029a4637 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 13 Jan 2023 12:33:24 -0500 Subject: [PATCH] nir: Optimize vendored sin/cos the same way As we've done for the AMD one, to prevent any codegen regression from switching the Midgard lowering. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Italo Nicola 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 079a522e768..32f420e2fb2 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -2588,7 +2588,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', 'fsin_amd', 'fcos_amd', 'fneg', 'fabs', 'fsign']: +for op in ['frcp', 'frsq', 'fsqrt', 'fexp2', 'flog2', 'fsign', 'fsin', 'fcos', 'fsin_amd', 'fcos_amd', 'fsin_mdg', 'fcos_mdg', 'fsin_agx', 'fneg', 'fabs', 'fsign']: optimizations += [ (('bcsel', c, (op + '(is_used_once)', a), (op + '(is_used_once)', b)), (op, ('bcsel', c, a, b))), ]