This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/14341] Missed comparison optimization (VRP)
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 May 2005 19:30:09 -0000
- Subject: [Bug tree-optimization/14341] Missed comparison optimization (VRP)
- References: <20040229062941.14341.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-07 19:30 -------
Huh, I don't understand why VRP does not take care of this:
i_13: [-2147483648, 99999999]
D.1236_4 = i_13 <= 99999999;
i_13 = ASSERT_EXPR <i_1, i_1 <= 99999999>;
D.1236_4 = i_13 <= 99999999;
The following is the testcase which I used with -O2 -fno-tree-dominator-opts, otherwise VRP is not
run:
void f(int);
int h(int, int);
void t(int *ttt)
{
int i;
int x;
*ttt = 1;
if (ttt== 0)
f(0);
for( i = 0; i < 100000000; i++ ){
f(i < 100000000);
}
}
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dnovillo at gcc dot gnu dot
| |org
Summary|Missed comparison |Missed comparison
|optimization (jump threading|optimization (VRP)
|related) |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14341