<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<div class="moz-cite-prefix">On 05/10/2017 05:18 AM, Sjoerd Meijer
via cfe-dev wrote:<br>
</div>
<blockquote
cite="mid:AM5PR0801MB1843E47B5F8E9BDD30DCA510FCEC0@AM5PR0801MB1843.eurprd08.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ARMv8.2-A introduces as an optional
extension half-precision data-processing instructions for
Advanced SIMD and floating-point in both AArch64 and AArch32
states [1], and we are looking into implementing
C/C++-language support for these new ARMv8.2-A half-precision
instructions.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We would like to introduce a new Clang
type. The reason is that we e.g. cannot use type __fp16
(defined in the ARM C Language Extensions [2]) because it is a
storage type only. This means when using standard C operators
values of __fp16 type promote to float when used in arithmetic
operations, which we would like to avoid for the ARMv8.2-A
half-precision instructions. Please note that the LLVM IR
already has a half precision type, onto which for example
__fp16 is mapped, so there are no changes or additions
required for the LLVM IR.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As a new Clang type we would like to
propose _Float16 as defined in a C11 extension, see [3].
Arithmetic is well defined, it is not only a storage type as
__fp16. Our question is whether a partial implementation, just
implementing this type and not claiming (full) C11 conformance
is acceptable?</p>
</div>
</blockquote>
<br>
I would very much like to see fp16 as a first-class floating-point
type in Clang and LLVM (i.e. handling that is not just a storage
type). Doing this in Clang in a way that is specified by C11 seems
like the right approach. I don't see why implementing this would be
predicated on implementing other parts of C11.<br>
<br>
-Hal<br>
<br>
<blockquote
cite="mid:AM5PR0801MB1843E47B5F8E9BDD30DCA510FCEC0@AM5PR0801MB1843.eurprd08.prod.outlook.com"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[1] ARM ARM: <a moz-do-not-send="true"
href="https://static.docs.arm.com/ddi0487/b/DDI0487B_a_armv8_arm.pdf">
https://static.docs.arm.com/ddi0487/b/DDI0487B_a_armv8_arm.pdf</a><o:p></o:p></p>
<p class="MsoNormal">[2] ARM C Language Extensions 2.1: <a
moz-do-not-send="true"
href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053d/IHI0053D_acle_2_1.pdf">http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053d/IHI0053D_acle_2_1.pdf</a><o:p></o:p></p>
<p class="MsoNormal">[3] ISO/IEC TS 18661-3 interchange and
extended types: <a moz-do-not-send="true"
href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1945.pdf">http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1945.pdf</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
<p class="MsoNormal">Sjoerd.<o:p></o:p></p>
</div>
IMPORTANT NOTICE: The contents of this email and any attachments
are confidential and may also be privileged. If you are not the
intended recipient, please notify the sender immediately and do
not disclose the contents to any other person, use it for any
purpose, or store or copy the information in any medium. Thank
you.
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>