<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;">LGTM. <div><br><div><div>On Jul 23, 2013, at 4:05 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="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;">Ping.<br><br>-Hal<br><br>----- Original Message -----<br><blockquote type="cite">----- Original Message -----<br><blockquote type="cite">Hi Hal,<br><br><br>I think that the round intrinsic should support all of the popular<br>rounding mode, and not only nearest integer.<br></blockquote><br>I agree, and we do currently, except for the round-away-from-zero<br>mode of round(). In libm, the different rounding modes have<br>different function calls, and we currently support (have the ability<br>to custom lower):<br>     FCEIL, FTRUNC, FRINT, FNEARBYINT, FFLOOR,<br><br>which correspond to:<br> ceil - smallest integral value not less than<br> trunc - round to integer, towards zero<br> floor - largest integral value not greater than<br> rint/nearbyint - round to nearest integer using the current<br> rounding mode (which is normally ties-to-even)<br><br>and now I'd like to add the remaining one:<br> round - round to nearest integer, away from zero<br><br>Thanks again,<br>Hal<br><br><blockquote type="cite"><br><br>Thanks,<br>Nadav<br><br><br><br>On Jul 7, 2013, at 9:04 PM, Hal Finkel < <a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a> > wrote:<br><br><br><br>Hello!<br><br>round() has been feeling a little left out; all of its friends<br>(like<br>rint() and nearbyint()) have their own ISD nodes, and round()<br>doesn't. Recent PowerPC cores have an instruction for round(), and<br>so I'd like to correct this injustice and add ISD::FROUND.<br><br>For the most part, this is extremely straightforward. I've added an<br>intrinsic and matching ISD node just like those for nearbyint() and<br>friends. The SelectionDAG pattern I've named frnd (because<br>ISD::FP_ROUND has already claimed fround); obviously we can use a<br>different name if someone has a better suggestion. Please review.<br><br>Thanks again,<br>Hal<br><br>--<br>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory<br><isd_round.patch> _______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br><br></blockquote><br>--<br>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory<br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br><br></blockquote><br>--<span class="Apple-converted-space"> </span><br>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory</div></blockquote></div><br></div></body></html>