mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-17 18:50:57 +08:00
re PR tree-optimization/92506 (Wrong code with -fwrapv since r277979)
2019-11-14 Andrew MacLeod <amacleod@redhat.com> PR tree-optimization/92506 * range-op.cc (range_operator::fold_range): Start with range undefined. (operator_abs::wi_fold): Fix wrong line copy... With wrapv, abs with overflow is varying. From-SVN: r278259
This commit is contained in:
parent
fae08a0507
commit
bbc85eb9cf
@ -1,3 +1,10 @@
|
||||
2019-11-14 Andrew MacLeod <amacleod@redhat.com>
|
||||
|
||||
PR tree-optimization/92506
|
||||
* range-op.cc (range_operator::fold_range): Start with range undefined.
|
||||
(operator_abs::wi_fold): Fix wrong line copy... With wrapv, abs with
|
||||
overflow is varying.
|
||||
|
||||
2019-11-14 Aldy Hernandez <aldyh@redhat.com>
|
||||
|
||||
* range-op.cc (*operator*::*range): Remove calls to
|
||||
|
@ -146,6 +146,7 @@ range_operator::fold_range (value_range &r, tree type,
|
||||
return;
|
||||
|
||||
value_range tmp;
|
||||
r.set_undefined ();
|
||||
for (unsigned x = 0; x < lh.num_pairs (); ++x)
|
||||
for (unsigned y = 0; y < rh.num_pairs (); ++y)
|
||||
{
|
||||
@ -2370,7 +2371,7 @@ operator_abs::wi_fold (value_range &r, tree type,
|
||||
wide_int max_value = wi::max_value (prec, sign);
|
||||
if (!TYPE_OVERFLOW_UNDEFINED (type) && wi::eq_p (lh_lb, min_value))
|
||||
{
|
||||
r = value_range (type, lh_lb, lh_ub);
|
||||
r = value_range (type);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user