On Sep 15, 2014, at 4:17 PM, Owen Anderson <resistor at mac.com> wrote:> I’d be fine with that proposal. I could even be convinced if we wanted to add a pair of NaN-propagating intrinsics as well, for targets and languages that want those semantics, even if I disagree with them. I do think that, if we are using the minnum/maxnum names, we should explicitly note that they are equivalent to C’s fmin/fmax, but not std::min/std::max or Java(script)’s min/max. > > —Owen > > >> On Sep 15, 2014, at 12:26 PM, Dan Gohman <dan433584 at gmail.com> wrote: >> >> Given IEEE-754's sway, and its saying what it does on this point, but given also the popularity of NaN-propagating min and max, how about a compromise? We add intrinsics following the IEEE-754 semantics, but we also follow IEEE-754 (and ARMv8) in renaming them to minnum and maxnum, to clarify which interpretation these intrinsics are using. > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdevI can rename these, but the convention followed by all the other LLVM intrinsics follow the C library names
On Sep 17, 2014, at 2:44 PM, Matt Arsenault <arsenm2 at gmail.com> wrote:> > On Sep 15, 2014, at 4:17 PM, Owen Anderson <resistor at mac.com> wrote: > >> I’d be fine with that proposal. I could even be convinced if we wanted to add a pair of NaN-propagating intrinsics as well, for targets and languages that want those semantics, even if I disagree with them. I do think that, if we are using the minnum/maxnum names, we should explicitly note that they are equivalent to C’s fmin/fmax, but not std::min/std::max or Java(script)’s min/max. >> >> —Owen >> >> >>> On Sep 15, 2014, at 12:26 PM, Dan Gohman <dan433584 at gmail.com> wrote: >>> >>> Given IEEE-754's sway, and its saying what it does on this point, but given also the popularity of NaN-propagating min and max, how about a compromise? We add intrinsics following the IEEE-754 semantics, but we also follow IEEE-754 (and ARMv8) in renaming them to minnum and maxnum, to clarify which interpretation these intrinsics are using. >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > I can rename these, but the convention followed by all the other LLVM intrinsics follow the C library namesminnum and maxnum matches their names in the IEEE 754 standard. It diverges LLVM’s convention, but the names are not without precedent. —Owen
On Sep 17, 2014, at 5:44 PM, Matt Arsenault <arsenm2 at gmail.com> wrote:> > On Sep 15, 2014, at 4:17 PM, Owen Anderson <resistor at mac.com> wrote: > >> I’d be fine with that proposal. I could even be convinced if we wanted to add a pair of NaN-propagating intrinsics as well, for targets and languages that want those semantics, even if I disagree with them. I do think that, if we are using the minnum/maxnum names, we should explicitly note that they are equivalent to C’s fmin/fmax, but not std::min/std::max or Java(script)’s min/max. >> >> —Owen >> >> >>> On Sep 15, 2014, at 12:26 PM, Dan Gohman <dan433584 at gmail.com> wrote: >>> >>> Given IEEE-754's sway, and its saying what it does on this point, but given also the popularity of NaN-propagating min and max, how about a compromise? We add intrinsics following the IEEE-754 semantics, but we also follow IEEE-754 (and ARMv8) in renaming them to minnum and maxnum, to clarify which interpretation these intrinsics are using. >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > I can rename these, but the convention followed by all the other LLVM intrinsics follow the C library namesUpdated patches that rename the intrinsics to minnum / maxnum, though the ISD names are still FMIN / FMAX -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Add-minnum-maxnum-intrinsics.patch Type: application/octet-stream Size: 93745 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140918/91cbc9dd/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-Move-minnum-maxnum-constant-folding-logic-into-APFlo.patch Type: application/octet-stream Size: 4069 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140918/91cbc9dd/attachment-0001.obj>
On Sep 18, 2014, at 2:54 PM, Matt Arsenault <arsenm2 at gmail.com> wrote:> > On Sep 17, 2014, at 5:44 PM, Matt Arsenault <arsenm2 at gmail.com> wrote: > >> >> On Sep 15, 2014, at 4:17 PM, Owen Anderson <resistor at mac.com> wrote: >> >>> I’d be fine with that proposal. I could even be convinced if we wanted to add a pair of NaN-propagating intrinsics as well, for targets and languages that want those semantics, even if I disagree with them. I do think that, if we are using the minnum/maxnum names, we should explicitly note that they are equivalent to C’s fmin/fmax, but not std::min/std::max or Java(script)’s min/max. >>> >>> —Owen >>> >>> >>>> On Sep 15, 2014, at 12:26 PM, Dan Gohman <dan433584 at gmail.com> wrote: >>>> >>>> Given IEEE-754's sway, and its saying what it does on this point, but given also the popularity of NaN-propagating min and max, how about a compromise? We add intrinsics following the IEEE-754 semantics, but we also follow IEEE-754 (and ARMv8) in renaming them to minnum and maxnum, to clarify which interpretation these intrinsics are using. >>> >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> I can rename these, but the convention followed by all the other LLVM intrinsics follow the C library names > > Updated patches that rename the intrinsics to minnum / maxnum, though the ISD names are still FMIN / FMAX > > > <0001-Add-minnum-maxnum-intrinsics.patch><0002-Move-minnum-maxnum-constant-folding-logic-into-APFlo.patch>ping
On Thu, Sep 18, 2014 at 2:54 PM, Matt Arsenault <arsenm2 at gmail.com> wrote:> Updated patches that rename the intrinsics to minnum / maxnum, though the > ISD names are still FMIN / FMAXCan you rename the ISD nodes to be consistent? Looking at patches. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141009/29c3e05a/attachment.html>