[Bug tree-optimization/23286] missed fully redundant expression
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Aug 8 19:54:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-08 19:54 -------
Here is a stupid testcase which can be sped up by pulling the reduandant expressions up:
int ii;
static inline int f(int i, int ii)
{
return i/ ii;
}
int h(int) __attribute__((pure,const));
int g(int i)
{
int j, j1 = i;
for (j = 0; j <1000; j++)
{
int ii1 = ii;
if (h(j))
i = j1/ii1 + 2;
else
i = j1/ii1;
}
return i;
}
As we then pull the division before the loop. As I said this was stupid as this was made up and I don't
know how often this happens in real life.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23286
More information about the Gcc-bugs
mailing list