This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21030] [4.1 Regression] ICE in set_value_range building 176.gcc with -O2
- 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: 28 Apr 2005 19:33:33 -0000
- Subject: [Bug tree-optimization/21030] [4.1 Regression] ICE in set_value_range building 176.gcc with -O2
- References: <20050414204122.21030.janis@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From kazu at cs dot umass dot edu 2005-04-28 19:33 -------
Diego,
I think it's OK to have contradictory information from an ASSERT_EXPR and
SCEV.
Let's say we have a loop counting from i = 0 upward.
It's possible that we "if (i < 0)" in the loop and see something like
i_10 = ASSERT_EXPR <i_1, i_1 < 0>;
on the "then" arm of the conditional. In this case, we know we are
counting upward, so SCEV tells us that the minimum value of i_10
should be 0, but the ASSERT_EXPR tells us that the range should be
[-INF, -1]. They are completely disjoint!
This weird situation comes from the fact that the "then" branch of the
conditional is dead. In this case, probably the safest and simplest
thing to do is to ignoring what SCEV says.
Kazu Hirata
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21030