<div dir="ltr">Not that I'm aware of. Did anything happen here?</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 16, 2015 at 5:26 PM, Richard Campbell <span dir="ltr"><<a href="mailto:rlcamp.pdx@gmail.com" target="_blank">rlcamp.pdx@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hal,<br>
<br>
SVN now seems to be respecting the -ffast-math flag in the way we desire without Matthijs’ temporary fix. I didn’t see any further traffic about this on the cfe-dev list - was there a discussion elsewhere? Did it get fixed by accident as part of some other change, and we should worry about whether it will come up again?<br>
<br>
Richard<br>
<br>
> On Jul 2, 2015, at 2:45 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br>
><br>
> Hi Richard,<br>
><br>
> Thanks for bringing this to my attention.<br>
><br>
> -Hal<br>
><br>
> ----- Original Message -----<br>
>> From: "Richard Campbell" <<a href="mailto:rlcamp.pdx@gmail.com">rlcamp.pdx@gmail.com</a>><br>
>> To: <a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a><br>
>> Sent: Wednesday, July 1, 2015 12:13:50 PM<br>
>> Subject: Fwd: Complex arithmetic ignores -ffast-math after clang r219557, serious performance regressions<br>
>><br>
>> Hal,<br>
>><br>
>><br>
>> I posted this in the cfe-dev mailing list about a week ago and didn’t<br>
>> get any replies. Can you comment on this or recommend another more<br>
>> ideal place to discuss it?<br>
>><br>
>><br>
>> Richard Campbell<br>
>><br>
>><br>
>><br>
>><br>
>> Begin forwarded message:<br>
>><br>
>> From: Richard Campbell < <a href="mailto:rlcamp.pdx@gmail.com">rlcamp.pdx@gmail.com</a> ><br>
>><br>
>> Subject: Complex arithmetic ignores -ffast-math after clang r219557,<br>
>> serious performance regressions<br>
>><br>
>> Date: June 25, 2015 at 11:54:10 AM PDT<br>
>><br>
>> To: <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
>><br>
>><br>
>><br>
>><br>
>> After building with clang 3.7svn recently, I saw a huge speed hit<br>
>> across much of our HPC and floating point DSP code. I looked at the<br>
>> asm output and it's riddled with calls to ___mulsc3, which is never<br>
>> inlined (preventing lots of other optimizations) and which includes<br>
>> a bunch of C99 Annex G-recommended branch conditions for range<br>
>> checks and whatnot. One of the purposes of -ffast-math has always<br>
>> been to disable these sort of checks, trusting the developer to<br>
>> ensure that they can't happen or will be handled upstream.<br>
>><br>
>><br>
>> Explicitly writing out the real and imaginary component math in one<br>
>> of my critical sections was enough to confirm that the problem lies<br>
>> here and not elsewhere. However, doing this throughout all of our<br>
>> code would be prohibitive, and of course greatly reduces the<br>
>> readability of the code and presumably the ability for future<br>
>> compilers to optimize it in a way that I haven’t though of yet.<br>
>><br>
>><br>
>> The relevant patch discussion in the mailing list is here:<br>
>> <a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20141006/116248.html" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20141006/116248.html</a><br>
>> and includes a comment from hfinkel also requesting that the<br>
>> libcalls be skipped in fast-math mode. From what I can see there was<br>
>> no followup on this.<br>
>><br>
>><br>
>> At the bare minimum I think these checks should be disabled within<br>
>> mulsc3 when ffast-math or the relevant subflag is enabled, and<br>
>> preferably that the library calls be skipped entirely as before, so<br>
>> that other compiler optimizations aren't prevented.<br>
>><br>
><br>
> --<br>
> Hal Finkel<br>
> Assistant Computational Scientist<br>
> Leadership Computing Facility<br>
> Argonne National Laboratory<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>