diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-08-02 20:26:57 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-08-02 20:26:57 +0000 |
commit | 9f8139900d3b6be84b303ad505cf5899e95d8ea2 (patch) | |
tree | e10fd0869574a56b51a64d75685d2375a74ead7b /gcc/fold-const.c | |
parent | f315a6b438a961737d5a0def08b4957866b348c7 (diff) | |
download | gcc-9f8139900d3b6be84b303ad505cf5899e95d8ea2.zip gcc-9f8139900d3b6be84b303ad505cf5899e95d8ea2.tar.gz gcc-9f8139900d3b6be84b303ad505cf5899e95d8ea2.tar.bz2 |
re PR bootstrap/49914 (call to abs(long long) in gcc/fold-const.c)
2011-08-02 Paolo Carlini <paolo.carlini@oracle.com>
PR bootstrap/49914
* fold-const.c (fold_plusminus_mult_expr): Use abs_hwi instead
of abs.
* tree-ssa-math-opts.c (gimple_expand_builtin_pow): Likewise.
* tree-ssa-loop-prefetch.c (prune_ref_by_group_reuse): Likewise.
From-SVN: r177212
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 736b5ca..8ad806f 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7037,8 +7037,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 ((int01 >= 0 ? int01 : -int01) - < (int11 >= 0 ? int11 : -int11)) + if (abs_hwi (int01) < abs_hwi (int11)) { tmp = int01, int01 = int11, int11 = tmp; alt0 = arg00, arg00 = arg10, arg10 = alt0; @@ -7048,7 +7047,7 @@ fold_plusminus_mult_expr (location_t loc, enum tree_code code, tree type, else maybe_same = arg11; - if (exact_log2 (abs (int11)) > 0 && int01 % int11 == 0 + if (exact_log2 (abs_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. */ |