[GHC] #3557: CPU Vector instructions in GHC.Prim

Alexander McPhail haskell.vivian.mcphail at gmail.com
Fri Oct 29 01:10:03 EDT 2010


Hi,

In LLVM we can use the `<vector 4 float>` type


> > -- in StgCmmPrim.hs
> > translateOp Float4AddOp    = Just (MO_F_Add  W32_4)
>
>
[#llvm <irc://irc.oftc.net/%23llvm>] LLVM: Low Level Virtual Machine:
http://llvm.org/
> Hi, if I apply '%res = fadd <vector 4 float> %arg0 %arg1' on an SSE2
capable machine, will that `fadd` instruction generate operations that work
in the XMM 128 bit register?
> i get "addps %xmm1, %xmm0" for that
> nicholas: Awesome, that's an SSE instruction. Thanks for your help.

and it will generate SSE instructions for us.

Vivian

DISCLAIMER

This transmission contains information that may be confidential. It is
intended for the named addressee only. Unless you are the named addressee
you may not copy or use it or disclose it to anyone else.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20101028/0e1e19c8/attachment.html


More information about the Glasgow-haskell-bugs mailing list