<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@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;}
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;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@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]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Vlad wrote: <o:p></o:p></p>
<p class="MsoNormal">> Unfortunately the LLVM x86 backend has at least one bug that causes FPU exceptions on valid FP operations that I know
<o:p></o:p></p>
<p class="MsoNormal">> of: <a href="https://bugs.llvm.org/show_bug.cgi?id=30885">
https://bugs.llvm.org/show_bug.cgi?id=30885</a>. You can work around that bug by using -march=haswell, if you continue
<o:p></o:p></p>
<p class="MsoNormal">> to hit other exceptions you can file LLVM bugs against them, though I'm not sure if there is anyone actively interested in
<o:p></o:p></p>
<p class="MsoNormal">> fixing them.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ll give it a try, although I don’t hold out much hope. <o:p>
</o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cameron wrote: <o:p></o:p></p>
<p class="MsoNormal">> This is something we're currently working on. See:<o:p></o:p></p>
<p class="MsoNormal">> <a href="https://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics">
https://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics</a><o:p></o:p></p>
<p class="MsoNormal">> There's still a lot to be done though. Short of this work, I don't think you'll find guarantees of trap-safety in LLVM.<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">That seems to be saying that trap-safety will be available on those intrinsics when they’re complete.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">How about expressions written with variables holding doubles and the ordinary C arithmetic operators? My chances of getting millions of line of code that use those re-written with intrinsics are
zero; without that, I’ll be forced to turn off floating-point traps if the -march=haswell tweak does not help.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Thanks, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">-- <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">John Dallman</span><o:p></o:p></p>
</div>
<p style="font-family:Arial; font-size:70%">-----------------<br>
Siemens Industry Software Limited is a limited company registered in England and Wales.<br>
Registered number: 3476850.<br>
Registered office: Faraday House, Sir William Siemens Square, Frimley, Surrey, GU16 8QD.
</p>
</body>
</html>