From fc460e7f20a657bee15f4c245a386d67190a200a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 4 Nov 2024 10:24:48 -0400 Subject: [PATCH] nir/opt_algebraic: don't lower amul if requested Signed-off-by: Alyssa Rosenzweig Reviewed-by: Karol Herbst Part-of: --- src/compiler/nir/nir_opt_algebraic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index fb23d196aa1..654d244b631 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -2477,9 +2477,9 @@ optimizations.extend([ (('fsign', 'a@64'), ('fsub', ('b2f', ('!flt', 0.0, a)), ('b2f', ('!flt', a, 0.0))), 'options->lower_doubles_options & nir_lower_dsign'), # Address/offset calculations: - # Drivers supporting imul24 should use the nir_lower_amul() pass, this + # Drivers supporting imul24 should use a pass like nir_lower_amul(), this # rule converts everyone else to imul: - (('amul', a, b), ('imul', a, b), '!options->has_imul24'), + (('amul', a, b), ('imul', a, b), '!options->has_imul24 && !options->has_amul'), (('umul24', a, b), ('imul', ('iand', a, 0xffffff), ('iand', b, 0xffffff)),