Do not fold -C*ABS<n> to ABS<-C*n> (i.e., do not move negative constants

inside ABS expression).
Obtained from:	Richard Guenther <rguenther@suse.de>
Approved by:	core
This commit is contained in:
David E. O'Brien 2007-12-11 03:35:39 +00:00
parent df954420dd
commit c817ff638d

View File

@ -5661,6 +5661,9 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type,
}
break;
}
/* If the constant is negative, we cannot simplify this. */
if (tree_int_cst_sgn (c) == -1)
break;
/* FALLTHROUGH */
case NEGATE_EXPR:
if ((t1 = extract_muldiv (op0, c, code, wide_type, strict_overflow_p))