Skip to content
  • Iago Toral's avatar
    compiler/nir: add a lowering pass to convert the bit size of ALU operations · b9a3d8c2
    Iago Toral authored
    
    
    Not all bit-sizes may be supported natively in hardware for all operations.
    This pass allows drivers to lower such operations to a bit-size that is
    actually supported and then converts the result back to the original
    bit-size.
    
    Compiler backends control which operations and wich bit-sizes require
    the lowering through a callback function.
    
    v2: generalize this pass and make it available in NIR core (Rob, Jason)
    v3: remove some temporaries and reduce nesting in instruction loop using
        a continue statement (Jason)
    
    Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
    b9a3d8c2