[PATCH] Add ISD::FROUND for libm round()

Hal Finkel hfinkel at anl.gov
Sun Jul 7 21:04:52 PDT 2013


Hello!

round() has been feeling a little left out; all of its friends (like rint() and nearbyint()) have their own ISD nodes, and round() doesn't. Recent PowerPC cores have an instruction for round(), and so I'd like to correct this injustice and add ISD::FROUND.

For the most part, this is extremely straightforward. I've added an intrinsic and matching ISD node just like those for nearbyint() and friends. The SelectionDAG pattern I've named frnd (because ISD::FP_ROUND has already claimed fround); obviously we can use a different name if someone has a better suggestion. Please review.

Thanks again,
Hal

--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: isd_round.patch
Type: text/x-patch
Size: 21441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130707/3e198b92/attachment.bin>


More information about the llvm-commits mailing list