Skip to content

Tests for additional builtin classification functions #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

spavloff
Copy link
Contributor

@spavloff spavloff commented Dec 6, 2023

This change adds tests for functions 'iszero', 'issubnornal' and 'issignaling'. It also adds tests for Intel fp80 type and some other small enhancements.

Migrated from: https://reviews.llvm.org/D112933

This change adds tests for functions 'iszero', 'issubnornal' and 'issignaling'.
It also adds tests for Intel fp80 type and some other small enhancements.

Differential Revision: https://reviews.llvm.org/D112933
@spavloff spavloff self-assigned this Dec 7, 2023
@DavidSpickett
Copy link
Contributor

Hi, one of these tests is failing on Arm and AArch64 with errors like:

cd /home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/sandbox/build/SingleSource/UnitTests && /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1.install/bin/llvm-size --format=sysv /home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/sandbox/build/SingleSource/UnitTests/testcase-CGExprConstant > /home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/sandbox/build/SingleSource/UnitTests/testcase-CGExprConstant.size
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
   38 |               (value))
      |               ~~~~~~~~
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/test-suite/SingleSource/UnitTests/Float/test_isfpclass.h:28:11: note: expanded from macro 'CHECK_CLASS'
   28 |     if (!(cond)) {                                                             \
      |           ^~~~
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/test-suite/SingleSource/UnitTests/Float/test_isfpclass.h:58:3: error: floating point classification requires argument of floating point type (passed in 'int')
   58 |   CHECK(fcFinite, x);
      |   ^~~~~~~~~~~~~~~~~~
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/test-suite/SingleSource/UnitTests/Float/test_isfpclass.h:37:60: note: expanded from macro 'CHECK'
   37 |   CHECK_CLASS(!!((flags)&FPCLASS) == !!__builtin_isfpclass((flags), (value)),  \
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
   38 |               (value))
      |               ~~~~~~~~
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/test-suite/SingleSource/UnitTests/Float/test_isfpclass.h:28:11: note: expanded from macro 'CHECK_CLASS'
   28 |     if (!(cond)) {                                                             \
      |           ^~~~
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/test-suite/SingleSource/UnitTests/Float/test_isfpclass.h:60:3: error: floating point classification requires argument of floating point type (passed in 'int')
   60 |   CHECK(fcQNan | fcInf | fcNormal | fcSubnormal | fcZero, x);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/test-suite/SingleSource/UnitTests/Float/test_isfpclass.h:37:60: note: expanded from macro 'CHECK'
   37 |   CHECK_CLASS(!!((flags)&FPCLASS) == !!__builtin_isfpclass((flags), (value)),  \
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
   38 |               (value))
      |               ~~~~~~~~
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/test-suite/SingleSource/UnitTests/Float/test_isfpclass.h:28:11: note: expanded from macro 'CHECK_CLASS'
   28 |     if (!(cond)) {                                                             \
      |           ^~~~

https://lab.llvm.org/buildbot/#/builders/183/builds/18017
https://lab.llvm.org/buildbot/#/builders/186/builds/13698

Your change is included but not listed as a change because buildbot only lists changes from the triggering repository, which is llvm-project in this case.

DavidSpickett added a commit that referenced this pull request Dec 13, 2023
This reverts commit 3ed1fbb due
to failures in the new tests on Arm and AArch64.

```
cd /home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/sandbox/build/SingleSource/UnitTests && /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1.install/bin/llvm-size --format=sysv /home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/sandbox/build/SingleSource/UnitTests/testcase-CGExprConstant > /home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/sandbox/build/SingleSource/UnitTests/testcase-CGExprConstant.size
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
   38 |               (value))
      |               ~~~~~~~~
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/test-suite/SingleSource/UnitTests/Float/test_isfpclass.h:28:11: note: expanded from macro 'CHECK_CLASS'
   28 |     if (!(cond)) {                                                             \
      |           ^~~~
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/test/test-suite/SingleSource/UnitTests/Float/test_isfpclass.h:58:3: error: floating point classification requires argument of floating point type (passed in 'int')
```

https://lab.llvm.org/buildbot/#/builders/183/builds/18017
https://lab.llvm.org/buildbot/#/builders/186/builds/13698
spavloff added a commit that referenced this pull request Dec 14, 2023
This change adds tests for functions 'iszero', 'issubnornal' and 'issignaling'.
It also adds tests for Intel fp80 type and some other small enhancements.

Migrated from: https://reviews.llvm.org/D112933
Pull request: #59

This is a recommit of 3ed1fbb, reverted in
3feeef3. It fixes arguments of calls to
__builtin_isfpclass.
@spavloff
Copy link
Contributor Author

While this patch was reviewed, __builtin_isfpclass changed signature, it caused the fail. Corrected patch was committed in 249c7ac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants