<div dir="ltr">Alex,<div><br></div><div>After looking into this a bit, it looks to me like the best thing to do for targets that do not natively support ISD::MINIMUM and ISD::MAXIMUM would be to fall back to a libcall, since implementing these operations in terms of existing operations is actually rather complicated. Do you think it would make sense to add builtin functions to compiler-rt to implement these operations, or is there a better way of handling this?</div><div><br></div><div>Thanks,</div><div><br></div><div>Thomas</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 1, 2018 at 11:49 AM Thomas Lively <<a href="mailto:tlively@google.com">tlively@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sounds good, I'll take a look.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 1, 2018 at 9:45 AM Alex Bradbury <<a href="mailto:asb@asbradbury.org" target="_blank">asb@asbradbury.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 11 Oct 2018 at 00:28, Thomas Lively via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> I just wanted to bump this to see if anyone has any input. I would really like to get these landed soon if there are no objections.<br>
<br>
Hi Thomas,<br>
<br>
With ISD::FMINNAN and ISD::FMAXNAN now easy to produce for any target<br>
due to these newly exposed intrinsics, I think these nodes should be<br>
handled in at least SelectionDAGLegalize::ExpandNode (for when the<br>
float type is legal but the operation is not) and<br>
DAGTypeLegalizer::SoftenFloatResult (for when the float type is not<br>
legal).<br>
<br>
Best,<br>
<br>
Alex<br>
</blockquote></div>
</blockquote></div>