Skip to content
  • Jonathan Marek's avatar
    nir: remove bool lowering from lower_int_to_float · f387c2b2
    Jonathan Marek authored
    
    
    Removes the bool_to_float logic from the int_to_float pass, so that both
    can be used separately. By having separate passes we have better validation
    and it makes it possible to use with the lower_ftrunc option (int lowering
    generates ftrunc, but lower_ftrunc generates bools, ftrunc lowering should
    probably be reworked). For now we always expect lower_bool to come after
    lower_int.
    
    Also fixes f2i32 to become ftrunc and adds u2f/f2u cases.
    
    Signed-off-by: default avatarJonathan Marek <jonathan@marek.ca>
    Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
    f387c2b2