[PATCH] [Builtins] Implement half-precision conversions.

Oleg Ranevskyy llvm.mail.list at gmail.com
Fri Jun 12 15:56:27 PDT 2015


Adding llvm-commits so that it is saved in the list history.
Thanks again for fixing this.

Kind regards,
Oleg

On Sat, Jun 13, 2015 at 1:50 AM, Oleg Ranevskyy <llvm.mail.list at gmail.com>
wrote:

> Yes, the tests now compile just fine.
> Thanks for the patch!
>
> On Fri, Jun 12, 2015 at 9:34 PM, Ahmed Bougacha <ahmed.bougacha at gmail.com>
> wrote:
>
>> On Mon, Jun 8, 2015 at 10:35 AM, Oleg Ranevskyy
>> <llvm.mail.list at gmail.com> wrote:
>> > Hi Ahmed,
>> >
>> > This patch added 3 new compiler-rt tests that include "fp_test.h".
>> > "fp_test.h" uses the __uint128_t type, which is not available on 32
>> bits.
>> > Some other tests also use the header but protect its include with `#if
>> > __LDBL_MANT_DIG__ == 113`. The added tests don't do this, so compilation
>> > fails.
>> >
>> > Would you consider adding similar protection to your tests, please?
>>
>> Sure, sorry for the breakage.  I hid the long double helpers in
>> fp_test.h directly instead, in r239630.  Is that good?
>>
>> -Ahmed
>>
>> > Thank you.
>> > Oleg
>> >
>> >
>> > 12.05.2015 04:39, Ahmed Bougacha пишет:
>> >
>> > Hi scanon,
>> >
>> > Mostly uninteresting, except:
>> >
>> > - in __extendXfYf2, when checking if the number is normal, the current
>> code
>> > relies on the unsignedness of src_rep_t, which is fine.  Except that
>> when
>> > sizeof(src_rep_t) < sizeof(int), the result gets promoted to int, the
>> > signedness of which breaks the comparison.  I added an explicit cast to
>> > avoid that;  it shouldn't affect other types.
>> >
>> > - we can't just pass __fp16 around (you even get a clang error), so I
>> made
>> > uint16_t explicit.
>> >
>> > - is there a good way to define aliases (for the gnu_*_ieee names) ?
>> Using
>> > the attribute, on darwin, clang complains about only weak aliases being
>> > supported, so I went with the simple def.
>> >
>> >
>> > I also need to finish writing unit tests in compiler-rt proper (I paused
>> > when I realized lit+cmake isn't supported).  In the meantime, opinions
>> > welcome.
>> >
>> > http://reviews.llvm.org/D9693
>> >
>> > Files:
>> >   lib/builtins/CMakeLists.txt
>> >   lib/builtins/extendhfsf2.c
>> >   lib/builtins/fp_extend.h
>> >   lib/builtins/fp_extend_impl.inc
>> >   lib/builtins/fp_trunc.h
>> >   lib/builtins/truncdfhf2.c
>> >   lib/builtins/truncsfhf2.c
>> >
>> > EMAIL PREFERENCES
>> >   http://reviews.llvm.org/settings/panel/emailpreferences/
>> >
>> >
>> >
>> > _______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> >
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150613/09ced3fc/attachment.html>


More information about the llvm-commits mailing list