simd branch ready for review

Alexander Kjeldaas alexander.kjeldaas at
Tue Feb 5 09:22:48 CET 2013

On Tue, Feb 5, 2013 at 12:56 AM, Johan Tibell <johan.tibell at>wrote:

> On Mon, Feb 4, 2013 at 3:19 PM, Geoffrey Mainland <mainland at>wrote:
>> What would a sensible fallback be for AVX instructions? What should we
>> fall back on when the LLVM backend is not being used?
> Depends on the instruction. A 256-bit multiply could be replaced by N
> multiplies etc. For popcount we have a little bit of C code in ghc-prim
> that we use if SSE 4.2 isn't enabled. An alternative is to emit some
> different assembly in e.g. the x86-64 backend if AVX isn't enabled.

The currently widest registers are 512 bits on Intel Phi.  AVX is designed
to handle 1024-bit wide registers (there's an unused bit in the VEX prefix).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list