static int is_float_to_int_conv(const ir_node *node)
{
ir_mode *mode = get_irn_mode(node);
+ unsigned size = get_mode_size_bits(mode);
ir_node *conv_op;
ir_mode *conv_mode;
- if (mode != mode_Is && mode != mode_Hs)
+ if (size != 16 && size != 32)
+ return 0;
+ if (!mode_is_signed(mode))
return 0;
if (!is_Conv(node))
ir_node *new_node;
/* fild can use source AM if the operand is a signed 16bit or 32bit integer */
- if (src_mode == mode_Is || src_mode == mode_Hs) {
+ if (mode_is_signed(src_mode) && (
+ get_mode_size_bits(src_mode) == 32 ||
+ get_mode_size_bits(src_mode) == 16
+ )) {
ia32_address_mode_t am;
match_arguments(&am, src_block, NULL, op, NULL, match_am | match_try_am | match_16bit_am);