Commit 23cdce68 by Richard Henderson Committed by Richard Henderson

fold-const.c (extract_muldiv): Don't distribute and widen multiply across plus…

fold-const.c (extract_muldiv): Don't distribute and widen multiply across plus for non-sizetype unsigned types.

        * fold-const.c (extract_muldiv): Don't distribute and widen
        multiply across plus for non-sizetype unsigned types.

From-SVN: r33151
parent 6e628096
2000-04-14 Richard Henderson <rth@cygnus.com> 2000-04-14 Richard Henderson <rth@cygnus.com>
* fold-const.c (extract_muldiv): Don't distribute and widen
multiply across plus for non-sizetype unsigned types.
2000-04-14 Richard Henderson <rth@cygnus.com>
* flow.c (find_auto_inc): Don't autoinc eliminable registers. * flow.c (find_auto_inc): Don't autoinc eliminable registers.
If the original source is dead in the incr insn, it's dead now. If the original source is dead in the incr insn, it's dead now.
......
...@@ -4480,6 +4480,14 @@ extract_muldiv (t, c, code, wide_type) ...@@ -4480,6 +4480,14 @@ extract_muldiv (t, c, code, wide_type)
if (op1 == 0 || TREE_OVERFLOW (op1)) if (op1 == 0 || TREE_OVERFLOW (op1))
break; break;
/* If we have an unsigned type is not a sizetype, we cannot widen
the operation since it will change the result if the original
computation overflowed. */
if (TREE_UNSIGNED (ctype)
&& ! TYPE_IS_SIZETYPE (ctype)
&& ctype != type)
break;
/* If we were able to eliminate our operation from the first side, /* If we were able to eliminate our operation from the first side,
apply our operation to the second side and reform the PLUS. */ apply our operation to the second side and reform the PLUS. */
if (t1 != 0 && (TREE_CODE (t1) != code || code == MULT_EXPR)) if (t1 != 0 && (TREE_CODE (t1) != code || code == MULT_EXPR))
......
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