<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 22, 2014, at 6:19 AM, Pasi Parviainen <<a href="mailto:pasi.parviainen@iki.fi" class="">pasi.parviainen@iki.fi</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On 22.10.2014 2:00, Matt Arsenault wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Author: arsenm<br class="">Date: Tue Oct 21 18:00:20 2014<br class="">New Revision: 220341<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=220341&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=220341&view=rev</a><br class="">Log:<br class="">Add minnum / maxnum intrinsics<br class=""><br class="">These are named following the IEEE-754 names for these<br class="">functions, rather than the libm fmin / fmax to avoid<br class="">possible ambiguities. Some languages may implement something<br class="">resembling fmin / fmax which return NaN if either operand is<br class="">to propagate errors. These implement the IEEE-754 semantics<br class="">of returning the other operand if either is a NaN representing<br class="">missing data.<br class=""><br class="">Added:<br class="">    llvm/trunk/test/Transforms/InstCombine/maxnum.ll<br class="">    llvm/trunk/test/Transforms/InstCombine/minnum.ll<br class="">Modified:<br class="">    llvm/trunk/docs/LangRef.rst<br class="">    llvm/trunk/include/llvm/IR/Intrinsics.td<br class="">    llvm/trunk/include/llvm/IR/PatternMatch.h<br class="">    llvm/trunk/include/llvm/Target/TargetSelectionDAG.td<br class="">    llvm/trunk/include/llvm/Transforms/Utils/VectorUtils.h<br class="">    llvm/trunk/lib/Analysis/ConstantFolding.cpp<br class="">    llvm/trunk/lib/Analysis/TargetTransformInfo.cpp<br class="">    llvm/trunk/lib/Analysis/ValueTracking.cpp<br class="">    llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp<br class="">    llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp<br class="">    llvm/trunk/test/Transforms/LoopVectorize/intrinsic.ll<br class="">    llvm/trunk/test/Transforms/SimplifyCFG/speculate-math.ll<br class=""><br class="">Modified: llvm/trunk/docs/LangRef.rst<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=220341&r1=220340&r2=220341&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=220341&r1=220340&r2=220341&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/docs/LangRef.rst (original)<br class="">+++ llvm/trunk/docs/LangRef.rst Tue Oct 21 18:00:20 2014<br class="">@@ -8028,9 +8028,9 @@ all types however.<br class=""><br class="">       declare float     @llvm.fabs.f32(float  %Val)<br class="">       declare double    @llvm.fabs.f64(double %Val)<br class="">-      declare x86_fp80  @llvm.fabs.f80(x86_fp80  %Val)<br class="">+      declare x86_fp80  @llvm.fabs.f80(x86_fp80 %Val)<br class="">       declare fp128     @llvm.fabs.f128(fp128 %Val)<br class="">-      declare ppc_fp128 @llvm.fabs.ppcf128(ppc_fp128  %Val)<br class="">+      declare ppc_fp128 @llvm.fabs.ppcf128(ppc_fp128 %Val)<br class=""><br class=""> Overview:<br class=""> """""""""<br class="">@@ -8050,6 +8050,89 @@ Semantics:<br class=""> This function returns the same values as the libm ``fabs`` functions<br class=""> would, and handles error conditions in the same way.<br class=""><br class="">+'``llvm.minnum.*``' Intrinsic<br class="">+^^^^^^^^^^^^^^^^^^^^^^^^^^^<br class="">+<br class="">+Syntax:<br class="">+"""""""<br class="">+<br class="">+This is an overloaded intrinsic. You can use ``llvm.minnum`` on any<br class="">+floating point or vector of floating point type. Not all targets support<br class="">+all types however.<br class="">+<br class="">+::<br class="">+<br class="">+      declare float     @llvm.minnum.f32(float %Val)<br class="">+      declare double    @llvm.minnum.f64(double %Val)<br class="">+      declare x86_fp80  @llvm.minnum.f80(x86_fp80 %Val)<br class="">+      declare fp128     @llvm.minnum.f128(fp128 %Val)<br class="">+      declare ppc_fp128 @llvm.minnum.ppcf128(ppc_fp128 %Val)<br class="">+<br class="">+Overview:<br class="">+"""""""""<br class="">+<br class="">+The '``llvm.minnum.*``' intrinsics return the minimum of the two<br class="">+arguments.<br class="">+<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Syntax section implies that intrinsic only takes one argument, but overview section is talking about two arguments.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div><div>Fixed in r220402</div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">+<br class="">+Arguments:<br class="">+""""""""""<br class="">+<br class="">+The arguments and return value are floating point numbers of the same<br class="">+type.<br class="">+<br class="">+Semantics:<br class="">+""""""""""<br class="">+<br class="">+Follows the IEEE-754 semantics for minNum, which also match for libm's<br class="">+fmin.<br class="">+<br class="">+If either operand is a NaN, returns the other non-NaN operand. Returns<br class="">+NaN only if both operands are NaN. If the operands compare equal,<br class="">+returns a value that compares equal to both operands. This means that<br class="">+fmin(+/-0.0, +/-0.0) could return either -0.0 or 0.0.<br class="">+<br class="">+'``llvm.maxnum.*``' Intrinsic<br class="">+^^^^^^^^^^^^^^^^^^^^^^^^^^^<br class="">+<br class="">+Syntax:<br class="">+"""""""<br class="">+<br class="">+This is an overloaded intrinsic. You can use ``llvm.maxnum`` on any<br class="">+floating point or vector of floating point type. Not all targets support<br class="">+all types however.<br class="">+<br class="">+::<br class="">+<br class="">+      declare float     @llvm.maxnum.f32(float  %Val)<br class="">+      declare double    @llvm.maxnum.f64(double %Val)<br class="">+      declare x86_fp80  @llvm.maxnum.f80(x86_fp80  %Val)<br class="">+      declare fp128     @llvm.maxnum.f128(fp128 %Val)<br class="">+      declare ppc_fp128 @llvm.maxnum.ppcf128(ppc_fp128  %Val)<br class="">+<br class="">+Overview:<br class="">+"""""""""<br class="">+<br class="">+The '``llvm.maxnum.*``' intrinsics return the maximum of the two<br class="">+arguments.<br class="">+<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Same here.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Pasi</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">+<br class="">+Arguments:<br class="">+""""""""""<br class="">+<br class="">+The arguments and return value are floating point numbers of the same<br class="">+type.<br class="">+<br class="">+Semantics:<br class="">+""""""""""<br class="">+Follows the IEEE-754 semantics for maxNum, which also match for libm's<br class="">+fmax.<br class="">+<br class="">+If either operand is a NaN, returns the other non-NaN operand. Returns<br class="">+NaN only if both operands are NaN. If the operands compare equal,<br class="">+returns a value that compares equal to both operands. This means that<br class="">+fmax(+/-0.0, +/-0.0) could return either -0.0 or 0.0.<br class="">+<br class=""> '``llvm.copysign.*``' Intrinsic<br class=""> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br class=""><br class=""><br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">llvm-commits mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></span></div></blockquote></div><br class=""></body></html>