From 90550b2a3e0809c47f51f97a84a91bb3f61103f7 Mon Sep 17 00:00:00 2001 From: "Juan A. Suarez Romero" Date: Tue, 10 Mar 2020 10:50:30 +0000 Subject: [PATCH] nir/algebraic: coalesce fmod lowering MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: --- src/compiler/nir/nir_opt_algebraic.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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'), -- 2.30.2