diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2006-06-15 11:42:03 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2006-06-15 09:42:03 +0000 |
commit | 0ad1d5a1d2d7275611ff841ced4642ade1d2a98f (patch) | |
tree | 85c42d4a341bc337e0b43abae07320d96c49e60f /gcc/double-int.c | |
parent | ec6c73926468e6de525d3be6810508990959c2b8 (diff) | |
download | gcc-0ad1d5a1d2d7275611ff841ced4642ade1d2a98f.zip gcc-0ad1d5a1d2d7275611ff841ced4642ade1d2a98f.tar.gz gcc-0ad1d5a1d2d7275611ff841ced4642ade1d2a98f.tar.bz2 |
tree-ssa-loop-niter.c (implies_nonnegative_p): New function.
* tree-ssa-loop-niter.c (implies_nonnegative_p): New function.
(derive_constant_upper_bound): Derive more precise upper bound in
common cases. Return type changed to double_int.
(record_estimate): Reflect the changed return type of
derive_constant_upper_bound.
* double-int.c (double_int_zext, double_int_sext): Fix.
* gcc.dg/tree-ssa/loop-18.c: New test.
From-SVN: r114674
Diffstat (limited to 'gcc/double-int.c')
-rw-r--r-- | gcc/double-int.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/double-int.c b/gcc/double-int.c index ab1975f..5a7b51d 100644 --- a/gcc/double-int.c +++ b/gcc/double-int.c @@ -72,8 +72,8 @@ double_int_zext (double_int cst, unsigned prec) double_int mask = double_int_mask (prec); double_int r; - r.low = cst.low & ~mask.low; - r.high = cst.high & ~mask.high; + r.low = cst.low & mask.low; + r.high = cst.high & mask.high; return r; } @@ -96,13 +96,13 @@ double_int_sext (double_int cst, unsigned prec) } if (((snum >> (prec - 1)) & 1) == 1) { - r.low = cst.low | mask.low; - r.high = cst.high | mask.high; + r.low = cst.low | ~mask.low; + r.high = cst.high | ~mask.high; } else { - r.low = cst.low & ~mask.low; - r.high = cst.high & ~mask.high; + r.low = cst.low & mask.low; + r.high = cst.high & mask.high; } return r; |