Commit 4412bb1f authored by yb9976's avatar yb9976
Browse files

Skip Conv nodes only if they do not change the mode size.

This fixes opt/dwlower3.c.
parent 7c232720
......@@ -2620,13 +2620,19 @@ restart:
ir_mode *mb = get_irn_mode(op_b);
if (mode_is_reference(ma) && mode_is_reference(mb)) {
/* SubInt(ConvInt(aP), ConvInt(bP)) -> SubInt(aP,bP) */
a = op_a;
b = op_b;
set_Sub_left(n, a);
set_Sub_right(n, b);
goto restart;
unsigned mode_size = get_mode_size_bits(mode);
unsigned ma_size = get_mode_size_bits(ma);
unsigned mb_size = get_mode_size_bits(mb);
if (ma_size == mode_size && mb_size == mode_size) {
/* SubInt(ConvInt(aP), ConvInt(bP)) -> SubInt(aP,bP) */
a = op_a;
b = op_b;
set_Sub_left(n, a);
set_Sub_right(n, b);
goto restart;
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment