This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add the remaining long double flavors of nearest integer functions.
ClosedPublic

Authored by sivachandra on Jun 25 2020, 12:18 PM.

Details

Summary

Specifically: ceill, floorl and roundl have been added.

Diff Detail

Event Timeline

sivachandra created this revision.Jun 25 2020, 12:18 PM

Did you miss the aarch64 entry points?

asteinhauser accepted this revision.Jun 25 2020, 3:59 PM
asteinhauser added inline comments.
libc/test/src/math/ceill_test.cpp
24

ASSERT_EQ(a, b) here and in the all following ASSERT_TRUE(a == b).

31

ASSERT_TRUE(a) instead of ASSERT_TRUE(a != 0). Eventually use ASSERT_NE(a, 0) if 0 does not autoconvert to false.

This revision is now accepted and ready to land.Jun 25 2020, 3:59 PM
sivachandra marked 2 inline comments as done.
  • Add the functions to aarch64 config.
  • Use ASSERT_EQ/NE where possible.

Did you miss the aarch64 entry points?

Yes and no :)
The most convenient way for me to verify the patch on aarch64 is to upload the patch and then use arc patch to apply it on the aarch64 machine. So, I did not add them to the aarch64 config in the first round as I had not tested them on aarch64. But, added now as I have now tested on aarch64 as well.

libc/test/src/math/ceill_test.cpp
24

Our unittest framework supports only integer types to me checked with ASSERT_EQ and ASSERT_NE. But, I took your suggestion and converted wherever I could.

This revision was automatically updated to reflect the committed changes.