diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-15 09:42:03 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-15 09:42:03 +0000 |
commit | d8a99c1725ef11f24d3fdc97c4076af4d2071031 (patch) | |
tree | 85c42d4a341bc337e0b43abae07320d96c49e60f /gcc/double-int.c | |
parent | c81c13fbb2afca2bf70bae0d119449db5aa2e621 (diff) | |
download | gcc-d8a99c1725ef11f24d3fdc97c4076af4d2071031.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114674 138bc75d-0d04-0410-961f-82ee72b054a4
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 ab1975f09a9..5a7b51dbe31 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; |