[Haskell-cafe] GHC-7.01 and intrinsic operations

Henning Thielemann schlepptop at henning-thielemann.de
Fri Dec 24 22:20:59 CET 2010

On 13.12.2010 16:38, Pavel Perikov wrote:
> Is it possible to make GHC-7.0.1 to generate intrinsic instructions instead of calls to C library to compute trigonometric functions?
>> main = do
>> 	a<- readLn
>> 	print  $ sin a
> I tried -O -msse2 -fllvm and their combinations. Generating assembly always contains calls for computation of sin

As far as I remember GHC generates FPU instructions for sinus and 
friends with its native code generator. However, I noted that LLVM does 
not do this and always jumps into the C library, although it is 
documented otherwise.

More information about the Haskell-Cafe mailing list