From 17557303625d95fc30b24d15b45e41d9b747aee6 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 25 Apr 2022 12:12:10 -0500 Subject: [PATCH] nir: Lower all bit sizes of usub_borrow It's not clear why this is restricted to 32-bit besides that being the only bit size where GLSL has an intrinsic for this. All drivers that set this probably want it lowered for all bit sizes as far as I can tell. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6353 Fixes: 8a3e3441802c ("nir/opt_algebraic: Fix some expressions with ambiguous bit sizes") Reviewed-by: Emma Anholt 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 830a5377199..3eba54f675f 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -1655,7 +1655,7 @@ optimizations.extend([ (('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', 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'), + (('usub_borrow', a, b), ('b2i', ('ult', a, b)), 'options->lower_usub_borrow'), (('bitfield_insert', 'base', 'insert', 'offset', 'bits'), ('bcsel', ('ult', 31, 'bits'), 'insert',