https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64464

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-08-01
          Component|middle-end                  |tree-optimization
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
here is the C testcase:
int f(int a, int b)
{
  for(int i = 0; i< 10000; i++)
    {
        int t = a * a - b * b;
        int t1 = 2 * a + b;
        g (t * t + t1 * t1 );
        a = t;
        b = t1;
    }
}
int f1(int a, int b)
{
  int a2 = a * a;
  int b2 = b * b;
  for(int i = 0; i< 10000; i++)
    {
        int t = a2 - b2;
        int t1 = 2 * a + b;
        g (t * t + t1 * t1 );
        a2 = t * t;
        b2 = t1 * t1;
        a = t;
        b = t1;
    }
}

---- CUT ----
I suspect this is a missing PRE; though I don't know if it makes sense to call
it that.

Reply via email to