[LLVMdev] No SSE instructions

Török Edwin edwintorok at gmail.com
Sun May 22 10:26:14 PDT 2011


On 05/22/2011 08:07 PM, Serg Anohovsky wrote:
> Hello.
> I have compiled the simple program:
> 
> #include <stdio.h>
> #include <stdlib.h>
> 
> int v1[10000];
> 
> int main()
> {
>         int i;
> 
>         for (i = 0; i < 10000; i++) {
>                 v1[i] = i;
>         }
> 
>         for (i = 0; i < 10000; i++) {
>                 printf("%d ", v1[i]);
>         }
> 
>         return 0;
> }
> 

This program has no floating point, and no vector data types, and no
vector intrinsics.
AFAIK those are the only situations where LLVM would produce SSE code.

GCC indeed produces some SSE instructions at -O3, because unlike LLVM it
has auto-vectorization support.

I doubt that for this particular loop the difference would be
significant though.

Best regards,
--Edwin



More information about the llvm-dev mailing list