From: Juan A. Suarez Romero Date: Tue, 10 Mar 2020 10:50:30 +0000 (+0000) Subject: nir/algebraic: coalesce fmod lowering X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=90550b2a3e0809c47f51f97a84a91bb3f61103f7;p=mesa.git nir/algebraic: coalesce fmod lowering As fmod for 16/32/64 bits lowering does the same, let's merge all of them in a single case. Fixes dEQP-VK.glsl.builtin.precision_double.mod.compute.* on ACO. Reviewed-by: Samuel Pitoiset Reviewed-by: Daniel Schürmann Signed-off-by: Juan A. Suarez Romero Tested-by: Marge Bot Part-of: --- diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 295b2e721af..cb5b30acb72 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -1019,8 +1019,7 @@ optimizations.extend([ (('bcsel', ('ine', a, -1), ('ifind_msb', a), -1), ('ifind_msb', a)), # Misc. lowering - (('fmod@16', a, b), ('fsub', a, ('fmul', b, ('ffloor', ('fdiv', a, b)))), 'options->lower_fmod'), - (('fmod@32', a, b), ('fsub', a, ('fmul', b, ('ffloor', ('fdiv', a, b)))), 'options->lower_fmod'), + (('fmod', a, b), ('fsub', a, ('fmul', b, ('ffloor', ('fdiv', a, b)))), 'options->lower_fmod'), (('frem', a, b), ('fsub', a, ('fmul', b, ('ftrunc', ('fdiv', a, b)))), 'options->lower_fmod'), (('uadd_carry@32', a, b), ('b2i', ('ult', ('iadd', a, b), a)), 'options->lower_uadd_carry'), (('usub_borrow@32', a, b), ('b2i', ('ult', a, b)), 'options->lower_usub_borrow'),