<div dir="ltr">Hi Hal,<div><br></div><div>Sure! This is strongly linked to my ValueTracking change. ValueTracking will be able to identify floating point mins and maxes, but as you know only a subset of those map to fminnum/fmaxnum. ARM at least has separate instructions for the different NaN behavior, so the intention of these patches is to provide SDAG support for them, and to use them most efficiently (there are currently three separate bits of code in the ARM/AArch64 backends to match these...).</div><div><br></div><div>Specifically, if matchSelectPattern() returns a SPF_FMINNUM or SPF_FMAXNUM, then:</div><div>  * SPNB_RETURNS_OTHER maps to ISD::FMINNUM/FMAXNUM which in ARM's case is matched to "fminnm"/"fmaxnm".</div><div>  * SPNB_RETURNS_NAN maps to ISD::FMINNAN/FMAXNAN which in ARM's case is matched to "fmin"/"fmax".</div><div>  * SPNB_RETURNS_ANY maps to either FMINNUM or FMINNAN depending on target availability. In -ffast-math mode, all queries return this.</div><div><br></div><div>This should allow us to take advantage of target instructions as much as possible, even in non-fast-math mode.</div><div><br></div><div>Cheers,</div><div><br></div><div>James</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, 26 Jul 2015 at 01:11 <a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a> <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hfinkel added a subscriber: hfinkel.<br>
hfinkel added a comment.<br>
<br>
Can you please describe the SDAG changes you have in mind; is there some common sequence of nodes involving fminnum/fmaxnum that you expect to turn into these nodes?<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D11262&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=I4utHxi6gLJol0YZlXN6HUpbHzb5QVeCygo3cvrZEcY&s=_-qSyMZmWZxQMGe8S3tyy8Raq54wtXA3oeQ9FY-ADBA&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D11262</a><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>