Skip to content
  • Faith Ekstrand's avatar
    nir/constant_expressions: Don't switch on bit size when not needed · 28e41506
    Faith Ekstrand authored
    
    
    For opcodes such as the nir_op_pack_64_2x32 for which all sources and
    destinations have explicit sizes, the bit_size parameter to the evaluate
    function is pointless and *should* do nothing.  Previously, we were
    always switching on the bit_size and asserting if it isn't one of the
    sizes in the list.  This generates way more code than needed and is a
    bit cruel because it doesn't let us have a bit_size of zero on an ALU op
    which shouldn't need a bit_size.
    
    Reviewed-by: default avatarEduardo Lima Mitev <elima@igalia.com>
    28e41506