This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RVCT ARM compiler 3.1

Note: This was originally posted on 20th February 2009 at http://forums.arm.com

Hi,

Does RVCT 3.1 compiler is intelligent enough to identify which part of code can be NEON optimized and compiled in NEON?

Does it also give instruciotns while compiling, whether the code can be better optimized if we hand code it in NEON?


Regards,
Mallikarjun
Parents
  • Note: This was originally posted on 20th February 2009 at http://forums.arm.com

    Mallikarjun,

    It has a go if you request vectorizing, e.g.:

    float vecmax(float *array)
    {
      int i;
      float max;

      max = array[0];
     
      for(i=0;i<128;i=i+1)
    if(array[i] > max) max = array[i];

      return max;
    }



    armcc --cpu=cortex-a8 -O3 -Otime --vectorize --remarks -c vecmax.c

    produces:
    "vecmax.c", line 10: #1679-D: Optimization: Loop vectorized (i)

    and generates vectorised floating-point Neon code.

    hth
    s.
Reply
  • Note: This was originally posted on 20th February 2009 at http://forums.arm.com

    Mallikarjun,

    It has a go if you request vectorizing, e.g.:

    float vecmax(float *array)
    {
      int i;
      float max;

      max = array[0];
     
      for(i=0;i<128;i=i+1)
    if(array[i] > max) max = array[i];

      return max;
    }



    armcc --cpu=cortex-a8 -O3 -Otime --vectorize --remarks -c vecmax.c

    produces:
    "vecmax.c", line 10: #1679-D: Optimization: Loop vectorized (i)

    and generates vectorised floating-point Neon code.

    hth
    s.
Children
No data