Hello,

I was trying to compare the performance of icc, gcc and llvm on the

program almabench.c in Coyote Benchmark suite. Here is a line of code

from the program.

da = da + (ca[np][k] * cos(arga) + sa[np][k] * sin(arga)) * 0.0000001;

gcc and icc are performing way better than llvm as they are using

'sincos' library function to compute the sin and the cos of the

argument in a single shot. However llvm is computing sin and cos

seperately.

Is there any compiler option which can enable the code generator to

use 'sincos' function against 'sin' and 'cos' functions seperately.

-Suresh

Hi Suresh,

I was trying to compare the performance of icc, gcc and llvm on the

program almabench.c in Coyote Benchmark suite. Here is a line of code

from the program.

da = da + (ca[np][k] * cos(arga) + sa[np][k] * sin(arga)) * 0.0000001;

gcc and icc are performing way better than llvm as they are using

'sincos' library function to compute the sin and the cos of the

argument in a single shot. However llvm is computing sin and cos

seperately.

Is there any compiler option which can enable the code generator to

use 'sincos' function against 'sin' and 'cos' functions seperately.

no, it hasn't been implemented in LLVM yet. Please open a bugreport if this

optimization is important for you.

Ciao, Duncan.

Duncan,

I am not sure how important the optimization is. I found this

optimization, when I am trying to improve the performance of the

almabench.c program in Coyote. On my machine:

1) With icc it takes 4 seconds.

2) With gcc it takes 8 seconds

3) With llvm it takes 12 seconds.

gcc and icc are using 'sincos' functions with icc using a vectorized

implementation of 'sincos' function.

However, I will open a bugreport on this.

-Suresh