Commit 70b7b037 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/35787 (Revision 133680 breaks 447.dealII)

2008-04-02  Richard Guenther  <rguenther@suse.de>

	* tree-vrp.c (extract_range_from_assert): Make sure to not
	produce range min/max with TREE_OVERFOW set.
	If merging a anti-range and a range keep the anti-range if
	the range covers all values of the type.
	(register_edge_assert_for_2): Only allow sign-changing
	conversions in detecting canonical range checks.  Also
	register an assert for the unsigned name if useful.

	PR tree-optimization/35787
	* tree-vrp.c (vrp_val_max): New function.
	(vrp_val_min): Likewise.
	(vrp_val_is_max): Move earlier, use vrp_val_{min,max}.
	(vrp_val_is_min): Likewise.
	(supports_overflow_infinity): Use vrp_val_{min,max}.
	(negative_overflow_infinity): Likewise.
	(positive_overflow_infinity): Likewise.
	(is_negative_overflow_infinity): Use vrp_val_is_{min,max}.
	(is_positive_overflow_infinity): Likewise.
	(is_overflow_infinity): Likewise.
	(avoid_overflow_infinity): Use vrp_val_{min,max} and
	vrp_val_is_{min,max}.
	(set_and_canonicalize_value_range): Canonicalize anti-ranges
	to ranges if possible.  Avoid empty ranges.

	* gcc.dg/tree-ssa/vrp38.c: New testcase.
	* gcc.dg/tree-ssa/vrp39.c: Likewise.

From-SVN: r133808
parent a6a0635e
2008-04-02 Richard Guenther <rguenther@suse.de>
* tree-vrp.c (extract_range_from_assert): Make sure to not
produce range min/max with TREE_OVERFOW set.
If merging a anti-range and a range keep the anti-range if
the range covers all values of the type.
(register_edge_assert_for_2): Only allow sign-changing
conversions in detecting canonical range checks. Also
register an assert for the unsigned name if useful.
PR tree-optimization/35787
* tree-vrp.c (vrp_val_max): New function.
(vrp_val_min): Likewise.
(vrp_val_is_max): Move earlier, use vrp_val_{min,max}.
(vrp_val_is_min): Likewise.
(supports_overflow_infinity): Use vrp_val_{min,max}.
(negative_overflow_infinity): Likewise.
(positive_overflow_infinity): Likewise.
(is_negative_overflow_infinity): Use vrp_val_is_{min,max}.
(is_positive_overflow_infinity): Likewise.
(is_overflow_infinity): Likewise.
(avoid_overflow_infinity): Use vrp_val_{min,max} and
vrp_val_is_{min,max}.
(set_and_canonicalize_value_range): Canonicalize anti-ranges
to ranges if possible. Avoid empty ranges.
2008-04-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR middle-end/35705
......
2008-04-02 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/vrp38.c: New testcase.
* gcc.dg/tree-ssa/vrp39.c: Likewise.
2008-04-01 George Helffrich <george@gcc.gnu.org>
PRs fortran/PR35154, fortran/PR23057
/* { dg-do run } */
/* { dg-options "-O2" } */
int __attribute__((noinline))
foo(char c)
{
unsigned short a = (unsigned short)c;
if (a >= -32000 && a <= 32000)
return c == 0;
return -1;
}
extern void abort (void);
int main()
{
if (foo(1) == 1)
abort ();
return 0;
}
/* { dg-do link } */
/* { dg-options "-O2" } */
extern void link_error (void);
void test1(int i)
{
if (i >= -5 && i <= 8)
{
unsigned int j = i;
if (j == -6)
link_error ();
if (j == 9)
link_error ();
}
}
int main() { return 0; }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment