We want to restrict some lowering passes to floats only,
and enable other for doubles.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
/* Don't generate new IR that would need to be lowered in an additional
* pass.
*/
- if (lowering(DIV_TO_MUL_RCP))
+ if (lowering(DIV_TO_MUL_RCP) && ir->type->is_float())
div_to_mul_rcp(div_expr);
ir_expression *const floor_expr =
break;
case ir_binop_mod:
- if (lowering(MOD_TO_FLOOR) && ir->type->is_float())
+ if (lowering(MOD_TO_FLOOR) && (ir->type->is_float() || ir->type->is_double()))
mod_to_floor(ir);
break;
break;
case ir_binop_ldexp:
- if (lowering(LDEXP_TO_ARITH))
+ if (lowering(LDEXP_TO_ARITH) && ir->type->is_float())
ldexp_to_arith(ir);
break;