diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-17 08:22:05 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-17 08:22:05 +0000 |
commit | 318a328178a8984bb2a0cc17e8c23ed21015b5fe (patch) | |
tree | c20e13777a5de4b4baf2a2a1fb88f0351d8a1b0e /gcc/tree-chrec.c | |
parent | f2c6bb6c9a10890e0e45a194d07414fa8da03a13 (diff) | |
download | gcc-318a328178a8984bb2a0cc17e8c23ed21015b5fe.tar.gz |
PR tree-optimization/27865
* tree-vrp.c (adjust_range_with_scev): Do not use TYPE_{MIN,MAX}_VALUE
for pointer types.
* tree-scalar-evolution.c (fold_used_pointer_cast, pointer_offset_p,
fold_used_pointer, pointer_used_p): New functions.
(analyze_scalar_evolution_1): Use fold_used_pointer.
* tree-chrec.c (convert_affine_scev): Convert no-op casts correctly.
* tree-ssa-loop-ivopts.c (generic_type_for): Return integral type
for pointers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116213 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r-- | gcc/tree-chrec.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index f36fc9b0291..a74a49c3972 100644 --- a/gcc/tree-chrec.c +++ b/gcc/tree-chrec.c @@ -1162,7 +1162,10 @@ convert_affine_scev (struct loop *loop, tree type, -- must_check_src_overflow is true, and the range of TYPE is superset of the range of CT -- i.e., in all cases except if CT signed and TYPE unsigned. - -- both CT and TYPE have the same precision and signedness. */ + -- both CT and TYPE have the same precision and signedness, and we + verify instead that the source does not overflow (this may be + easier than verifying it for the result, as we may use the + information about the semantics of overflow in CT). */ if (must_check_src_overflow) { if (TYPE_UNSIGNED (type) && !TYPE_UNSIGNED (ct)) @@ -1172,7 +1175,10 @@ convert_affine_scev (struct loop *loop, tree type, } else if (TYPE_UNSIGNED (ct) == TYPE_UNSIGNED (type) && TYPE_PRECISION (ct) == TYPE_PRECISION (type)) - must_check_rslt_overflow = false; + { + must_check_rslt_overflow = false; + must_check_src_overflow = true; + } else must_check_rslt_overflow = true; } |