This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/47892] Fails to vectorize comparison code, if-conversion fails


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47892

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-25 10:24:21 UTC ---
Testcase:

#define PIO6 0.523598776f
#define SA5 2.74201854577e-06f
#define SA4 -1.98410347969e-04f
#define SA3 8.33333320429e-03f
#define SA2 -1.66666666666e-01f

void bestseries9(float * __restrict__ arr,int len) 
{
  int i;
  for(i=0; i<len; i++)
    {
      float or=arr[i];
      float orig=or / 3*(or>PIO6);
      float sqr=orig*orig;
      arr[i]=orig*(1+sqr*(SA2+sqr*(SA3+sqr*(SA4+SA5*sqr))));
      arr[i]=arr[i]*(1+(or>PIO6)*(2-4*arr[i]*arr[i]));
    }
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]