nir/opt_algebraic: Fix some expressions with ambiguous bit sizes
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
parent
7e0ee3a38b
commit
8a3e344180
|
@ -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@32', a, b), ('b2i', ('ult', ('iadd', a, b), a)), 'options->lower_uadd_carry'),
|
||||
(('usub_borrow@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@32'), ('bitfield_reverse', 'x'))]
|
||||
|
||||
|
||||
# Add optimizations to handle the case where the result of a ternary is
|
||||
|
|
Loading…
Reference in New Issue