[cfe-dev] Changing semantics of __fp16

Sjoerd Meijer via cfe-dev cfe-dev at lists.llvm.org
Thu Dec 10 09:02:12 PST 2020


Hello Steve and Konstantin,

Many thanks for replies. This is exactly the kind of feedback I was hoping for.

I personally fully agree with all your comments Steve. You're also absolutely right of course that this violates the ACLE, so changing that is the implication for choosing this Approach B. So, with this support, I will start progressing this ACLE spec change which is the first thing to do, I think.

Cheers,
Sjoerd.
________________________________
From: Steve (Numerics) Canon <scanon at apple.com>
Sent: 10 December 2020 16:18
To: Sjoerd Meijer <Sjoerd.Meijer at arm.com>
Cc: cfe-dev at lists.llvm.org Developers <cfe-dev at lists.llvm.org>; Richard Sandiford <Richard.Sandiford at arm.com>
Subject: Re: [cfe-dev] Changing semantics of __fp16

Hi —

Silently changing the semantics of __fp16 (Approach A) so that existing programs suddenly get different (and in many cases, worse) results seems quite problematic to me.

Approach B is _also_ deeply flawed, however, as it violates the ACLE documentation for float16_t:

> If the __fp16 type is defined, float16_t is defined as an alias for it.

I have a slight preference for approach B, because it only effects people using float16_t, and not users of __fp16, and allows them the escape valve of switching to using __fp16 explicitly if they need the old behavior.

– Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20201210/33c3e08f/attachment.html>


More information about the cfe-dev mailing list