mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
nir: fix algebraic optimizations
The optimizations are only valid for 32-bit integers. They were mistakenly firing for 64-bit integers as well. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
d62063ce31
commit
de91461575
1 changed files with 2 additions and 2 deletions
|
|
@ -250,8 +250,8 @@ optimizations = [
|
|||
(('ishr', a, 0), a),
|
||||
(('ushr', 0, a), 0),
|
||||
(('ushr', a, 0), a),
|
||||
(('iand', 0xff, ('ushr', a, 24)), ('ushr', a, 24)),
|
||||
(('iand', 0xffff, ('ushr', a, 16)), ('ushr', a, 16)),
|
||||
(('iand', 0xff, ('ushr@32', a, 24)), ('ushr', a, 24)),
|
||||
(('iand', 0xffff, ('ushr@32', a, 16)), ('ushr', a, 16)),
|
||||
# Exponential/logarithmic identities
|
||||
(('~fexp2', ('flog2', a)), a), # 2^lg2(a) = a
|
||||
(('~flog2', ('fexp2', a)), a), # lg2(2^a) = a
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue