projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d62063c
)
nir: fix algebraic optimizations
author
Connor Abbott
<cwabbott0@gmail.com>
Tue, 1 Aug 2017 01:26:49 +0000
(18:26 -0700)
committer
Connor Abbott
<cwabbott0@gmail.com>
Tue, 1 Aug 2017 19:20:49 +0000
(12:20 -0700)
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>
src/compiler/nir/nir_opt_algebraic.py
patch
|
blob
|
history
diff --git
a/src/compiler/nir/nir_opt_algebraic.py
b/src/compiler/nir/nir_opt_algebraic.py
index df5854270c46872c74cdafc4cd7ac647b762c131..ad75228a50f9739214294ea3a9033340286be41d 100644
(file)
--- a/
src/compiler/nir/nir_opt_algebraic.py
+++ b/
src/compiler/nir/nir_opt_algebraic.py
@@
-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