[LLVMdev] -msse3 can degrade performance

Chris Lattner clattner at apple.com
Sun Feb 1 22:10:26 PST 2009


On Jan 30, 2009, at 9:43 PM, Jon Harrop wrote:

> On Saturday 31 January 2009 03:42:04 Eli Friedman wrote:
>> On Fri, Jan 30, 2009 at 5:43 PM, Jon Harrop <jon at ffconsultancy.com>  
>> wrote:
>>> I just remembered an anomalous result that I stumbled upon whilst
>>> tweaking the command-line options to llvm-gcc. Specifically, the - 
>>> msse3
>>> flag
>>
>> The -msse3 flag?  Does the -msse2 flag have a similar effect?
>
> Yes:

Hi Jon,

I'm seeing exactly identical .s files with -msse2 and -msse3 on the  
scimark version I have.  Can you please send the output of:

llvm-gcc -O3 MonteCarlo.c -S -msse2 -o MonteCarlo.2.s
llvm-gcc -O3 MonteCarlo.c -S -msse3 -o MonteCarlo.3.s

llvm-gcc -O3 MonteCarlo.c -S -msse2 -o MonteCarlo.2.ll -emit-llvm
llvm-gcc -O3 MonteCarlo.c -S -msse3 -o MonteCarlo.3.ll -emit-llvm

Thanks,

-Chris

>
>
> $ llvm-gcc -Wall -lm -O3 -msse2 *.c -o scimark2
> $ ./scimark2
> Composite Score:          525.99
> FFT             Mflops:   538.35    (N=1024)
> SOR             Mflops:   472.29    (100 x 100)
> MonteCarlo:     Mflops:   120.92
> Sparse matmult  Mflops:   585.14    (N=1000, nz=5000)
> LU              Mflops:   913.27    (M=100, N=100)
>
> But -msse does not:
>
> $ llvm-gcc -Wall -lm -O3 -msse *.c -o scimark2
> $ ./scimark2
> Composite Score:          540.08
> FFT             Mflops:   535.04    (N=1024)
> SOR             Mflops:   469.99    (100 x 100)
> MonteCarlo:     Mflops:   197.38
> Sparse matmult  Mflops:   587.77    (N=1000, nz=5000)
> LU              Mflops:   910.22    (M=100, N=100)
>
> That was x64 and I get similar results for x86.
>
> Is there some kind of contention between the integer and SSE  
> registers?
>
> -- 
> Dr Jon Harrop, Flying Frog Consultancy Ltd.
> http://www.ffconsultancy.com/?e
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list