aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-08-18 11:30:42 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-08-18 11:30:42 +0000
commit4c9cf7af89d0800e1f8fdeeba03ea41cdc3115f1 (patch)
treefbdfd26aa897edd883893073cf2f3b2ed9769b4a /gcc/fold-const.c
parent97919ae7b65c192b0fdb6dfa6abdebd63a3f4ba9 (diff)
downloadgcc-4c9cf7af89d0800e1f8fdeeba03ea41cdc3115f1.zip
gcc-4c9cf7af89d0800e1f8fdeeba03ea41cdc3115f1.tar.gz
gcc-4c9cf7af89d0800e1f8fdeeba03ea41cdc3115f1.tar.bz2
re PR tree-optimization/49963 (ICE: in abs_hwi, at hwint.c:108)
2011-08-18 Paolo Carlini <paolo.carlini@oracle.com> Joseph Myers <joseph@codesourcery.com> PR tree-optimization/49963 * hwint.c (absu_hwi): Define. * hwint.h (absu_hwi): Declare. * fold-const.c (fold_plusminus_mult_expr): Use absu_hwi instead of abs_hwi. * tree-ssa-math-opts.c (gimple_expand_builtin_pow): Likewise. * tree-ssa-loop-prefetch.c (prune_ref_by_group_reuse): Likewise. Co-Authored-By: Joseph Myers <joseph@codesourcery.com> From-SVN: r177848
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index a73b1e6..dcd6989 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -7036,7 +7036,7 @@ fold_plusminus_mult_expr (location_t loc, enum tree_code code, tree type,
int11 = TREE_INT_CST_LOW (arg11);
/* Move min of absolute values to int11. */
- if (abs_hwi (int01) < abs_hwi (int11))
+ if (absu_hwi (int01) < absu_hwi (int11))
{
tmp = int01, int01 = int11, int11 = tmp;
alt0 = arg00, arg00 = arg10, arg10 = alt0;
@@ -7046,7 +7046,7 @@ fold_plusminus_mult_expr (location_t loc, enum tree_code code, tree type,
else
maybe_same = arg11;
- if (exact_log2 (abs_hwi (int11)) > 0 && int01 % int11 == 0
+ if (exact_log2 (absu_hwi (int11)) > 0 && int01 % int11 == 0
/* The remainder should not be a constant, otherwise we
end up folding i * 4 + 2 to (i * 2 + 1) * 2 which has
increased the number of multiplications necessary. */