Skip to content
  • Eduardo Lima Mitev's avatar
    nir_algebraic: Add basic optimizations for umul_low and imadsh_mix16 · 3addd7c8
    Eduardo Lima Mitev authored
    
    
    For umul_low (al * bl), zero is returned if the low 16-bits word of either
    source is zero.
    
    for imadsh_mix16 (ah * bl << 16 + c), c is returned if either 'ah' or 'bl'
    is zero.
    
    A couple of nir_search_helpers are added:
    
    is_upper_half_zero() returns true if the highest word of all components of
    an integer NIR alu src are zero.
    
    is_lower_half_zero() returns true if the lowest word of all components of
    an integer nir alu src are zero.
    
    Reviewed-by: default avatarEric Anholt <eric@anholt.net>
    3addd7c8