[LLVMdev] -msse3 can degrade performance

Jon Harrop jon at ffconsultancy.com
Fri Jan 30 21:43:29 PST 2009


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:

$ 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



More information about the llvm-dev mailing list