<div dir="ltr">On 7 June 2013 07:05, Owen Anderson <span dir="ltr"><<a href="mailto:resistor@mac.com" target="_blank">resistor@mac.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div><span style="color:rgb(34,34,34)">Darwin uses NEON for floating point, but does *not* (and should not). globally enable fast math flags.  Use of NEON for FP needs to remain achievable without globally setting the fast math flags.  Fast math may imply reasonably imply NEON, but the opposite direction is not accurate.</span><br>

</div>
<br>
That said, I don't think anyone would object to making VFP codegen available under non-Darwin triples.  It's just a matter of making it happen.<br></blockquote><div></div></div><br></div><div class="gmail_extra" style>
Hi Owen,</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>ARMSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) has a check to see if the target is Darwin or if UnsafeMath is enabled to set the UseNEONForSinglePrecisionFP, but only for A5 and A8, where this was a problem. Maybe I was too conservative on my fix.<br>
</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>Tobi,</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>The march=arm option would default to ARMv4, while mattr=+neon would force NEON, but I'm not sure it would default to A8, which would be a weird combination of ARM7TDMI+NEON.</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style>There are two things to know at this point:</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>1. When the execution gets to resetSubtargetFeatures, what CPU has it detected for your arguments. You may also have to look at ARM.td to see if the CPU that it got detected has in its description the feature "FeatureNEONForFP".</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style>2. If the CPU is correct (Cortex-A*), and it's neither A5 nor A8, do we still want to generate single-precision float on NEON when non-Darwin and safe math? I don't think so. Possibly, that condition should be extended to ignore the CPU you're using and *only* emit NEON SP-FP when either Darwin or UnsafeMath are on.</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra">cheers,</div><div class="gmail_extra">--renato</div></div>