This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21289] New: A numeric range is spoiled by a symblic one in VRP
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Apr 2005 19:14:09 -0000
- Subject: [Bug tree-optimization/21289] New: A numeric range is spoiled by a symblic one in VRP
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider
int
foo (int a, int b)
{
if (a == 1)
if (a < b)
if (a == 1)
return 1;
return 0;
}
VRP does not remove the third "if" even though 'a' is known to be 1.
This is because the symbolic range obtained from the second "if"
spoils the numeric range [1, 1] obtained from the first "if".
extract_range_from_assert tries to refine a range from an ASSERT_EXPR
if there is another range previously available, but in this case,
VRP cannot prove that [1,1] and [-INF, b-1] intersects,
it does not refine a range.
--
Summary: A numeric range is spoiled by a symblic one in VRP
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: dnovillo at redhat dot com,gcc-bugs at gcc dot gnu dot
org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21289