[Mesa-dev] [PATCH 5/6] nir/opt_algebraic: Fix some expressions with ambiguous bit sizes

Jason Ekstrand jason at jlekstrand.net
Tue Apr 26 04:39:23 UTC 2016


---
 src/compiler/nir/nir_opt_algebraic.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index fc439f0..2ad1c70 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -295,8 +295,8 @@ optimizations = [
    # Misc. lowering
    (('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', a, b), ('b2i', ('ult', a, b)), 'options->lower_usub_borrow'),
+   (('uadd_carry at 32', a, b), ('b2i', ('ult', ('iadd', a, b), a)), 'options->lower_uadd_carry'),
+   (('usub_borrow at 32', a, b), ('b2i', ('ult', a, b)), 'options->lower_usub_borrow'),
 
    (('bitfield_insert', 'base', 'insert', 'offset', 'bits'),
     ('bcsel', ('ilt', 31, 'bits'), 'insert',
@@ -419,7 +419,7 @@ def bitfield_reverse(u):
 
     return step5
 
-optimizations += [(bitfield_reverse('x'), ('bitfield_reverse', 'x'))]
+optimizations += [(bitfield_reverse('x at 32'), ('bitfield_reverse', 'x'))]
 
 
 # Add optimizations to handle the case where the result of a ternary is
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list