This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17100] Missed opportunity for value range optimization
- From: "nathan at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Oct 2004 10:34:44 -0000
- Subject: [Bug tree-optimization/17100] Missed opportunity for value range optimization
- References: <20040819145911.17100.steinmtz@us.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From nathan at gcc dot gnu dot org 2004-10-12 10:34 -------
I think this is an artifact of the design of the current value range
propagation. That's not really range propagation by comparison result CSEing.
The loop exit is i < 10, and the next comparison is i == 15. We can propagate
the 'i < 10' result
and deduce that i == 15 must be false. The later i == -5 can't be determined
from the result of i < 10.
I suspect this will be much easier to fix with a proper SSA VRP pass.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17100