nir/opt_algebraic: don't lower amul if requested

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
This commit is contained in:
Alyssa Rosenzweig
2024-11-04 10:24:48 -04:00
parent 1f3c97547a
commit fc460e7f20
+2 -2
View File
@@ -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)),