[haskell-llvm] Crashes in Array, Vector, DotProd

Henning Thielemann lemming at henning-thielemann.de
Mon Oct 11 16:57:03 EDT 2010


Bryan O'Sullivan schrieb:
> On Mon, Oct 11, 2010 at 1:26 PM, Henning Thielemann
> <lemming at henning-thielemann.de <mailto:lemming at henning-thielemann.de>>
> wrote:
> 
>     I suggest to introduce new functions 'iadd', 'isub', 'imul' that have
>     IsInteger constraint and alter 'add', 'sub', 'mul' such that they call
>     LLVM's 'add' and so on for integers and LLVM's 'fadd' and so on for
>     floating point numbers. This would maintain the current behaviour and
>     the names sound reasonable to me, they are however not consistent with
>     the ones of LLVM. If you like that, I'll submit a patch.
> 
> 
> So 2.8 uses fadd for floats, and add for ints, while we have just add?

We would have 'fadd' for floats, 'iadd' for integers and 'add' for
automatic choice of the corresponding LLVM instruction.

Up to LLVM-2.6 (and certainly LLVM-2.7) and llvm-0.8.2 we have 'fadd'
for floats, 'add' for automatic choice, however that choice was made by
LLVM. I think this was an interim solution in LLVM and the plan was to
separate floating point and integer instructions.



More information about the Haskell-llvm mailing list