
5 Feb
2013
5 Feb
'13
3:22 a.m.
On Tue, Feb 5, 2013 at 12:56 AM, Johan Tibell
On Mon, Feb 4, 2013 at 3:19 PM, Geoffrey Mainland
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). Alexander