#3557: CPU Vector instructions in GHC.Prim
---------------------------------+------------------------------------------
Reporter: guest | Owner: vivian
Type: feature request | Status: new
Priority: normal | Milestone: _|_
Component: Compiler (NCG) | Version: 6.11
Keywords: | Testcase:
Blockedby: | Difficulty: Unknown
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by vivian):
Maybe better would be to add an array type. LLVM already has one, as does
the LlvmGen code.
{{{
data CmmType -- The important one!
= CmmType CmmCat Width
| CmmArray CmmCat Width Length -- new type
}}}
Then we can use existing `MachOp`s on the new array types.
At the Haskell level, the new primOps can be on `Array#`s. In a machine,
e.g. SSE4 capable, that has a CPU float vector width of 4 floats
(multiplying four floats at once), the `Array# Float#` can be cast to
`Array# Xmm128Float#` and the multiply operation iterated over the `Array#
Xmm128Float#`. A conversion back to `Array# Float#` gives the result.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3557#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs