Details
Diff Detail
- Repository
- rT test-suite
- Build Status
Buildable 116201 Build 167363: arc lint + arc unit
Event Timeline
Something I noticed is that we don't have much test coverage in clang/test/codegen for the fpclass intrinsics - including no constexpr testing afaict (although I don't think __builtin_fpclassify is constexpr yet) - is that something you'd be willing to take a look at?
SingleSource/UnitTests/Float/classify.cpp | ||
---|---|---|
89 | are asserts the best way to do this? most other unit tests print out something to help isolate diffs |
Updated patch
- Moved tests into header files. It should facilitate writing tests for various modes (strict exceptions, fast math etc),
- Added Makefile,
- Enhanced diagnostics if test fails,
- Avoid C++, it makes easier to run test on simulator if there are fewer dependencies.
They present and are in clang/test/Sema/constant-builtins-2.c. This is C file but the constant evaluator is the same for C++. The tested functions are fpclassify, isinf, isnan, isfinite and isnormal. And yes, fpclassify is constexpr.
I've no objections to this - it seems to be orthogonal to the isnan ir intrinsic conversation.
Do we have test-suite buildbot coverage on anything other than x86? Cross platform uses of long double is always fun........
Any other comments?
The following build bots have a stage named test-suite:
clang-ppc64be-linux-lnt
clang-ppc64le-linux-lnt
clang-s390x-linux-lnt
clang-armv7-lnt
clang-native-arm-lnt-perf
clang-aarch64-full-2stage
clang-armv7-vfpv3-full-2stage
clang-thumbv7-full-2stage
clang-cmake-x86_64-avx2-linux-perf
clang-cmake-x86_64-avx2-linux
So it looks like major targets are represented in testing.
If nobody objects, I would commit this change, as it would be useful in the forthcoming return of llvm.isnan.
are asserts the best way to do this? most other unit tests print out something to help isolate diffs