-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix clang support #21
Commits on Nov 2, 2023
-
ChangeLog: * README.md: Add a section about constexpr_wrapper.
Configuration menu - View commit details
-
Copy full SHA for 3743fe1 - Browse repository at this point
Copy the full SHA 3743fe1View commit details -
Don't use always-inline attribute with Clang
Clang warns about and doesn't use the always_inline attribute on lambdas. Therefore only define the macro if __clang__ is not defined. ChangeLog: * vir/detail.h: Guard VIR_LAMBDA_ALWAYS_INLINE with not __clang__.
Configuration menu - View commit details
-
Copy full SHA for 5032f7b - Browse repository at this point
Copy the full SHA 5032f7bView commit details -
Fix simd_policy implementation for Clang
Clang and GCC disagree about whether the decltype of an NTTP is const or not. This made it work on GCC but not on Clang. Avoid the issue by using types as simd_policy options instead of NTTPs. ChangeLog: * vir/simd_execution.h (simd_policy): Refactor to type-based options instead of NTTPs.
Configuration menu - View commit details
-
Copy full SHA for 0851859 - Browse repository at this point
Copy the full SHA 0851859View commit details -
Work around Clang not allowing less-equal in constant expressions
ChangeLog: * vir/simd_execution.h: Replace a + b <= c with a + b - 1 < c.
Configuration menu - View commit details
-
Copy full SHA for b25b2cf - Browse repository at this point
Copy the full SHA b25b2cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74003aa - Browse repository at this point
Copy the full SHA 74003aaView commit details -
Don't trigger Clang bug in libstdc++'s zip_view implementation
ChangeLog: * testsuite/tests/transform.cc: #ifdef zip_view test for __clang_major__ <= 17. Remove unused lambda captures.
Configuration menu - View commit details
-
Copy full SHA for 91166a6 - Browse repository at this point
Copy the full SHA 91166a6View commit details -
Disable irrelevant Clang warnings
* We don't need warnings about self-assignment when testing that self-assignment works. * The GCC-compatible method of PCH inclusion triggers a -Wdeprecated warning, which isn't helpful. Turning it off.
Configuration menu - View commit details
-
Copy full SHA for b90cdf9 - Browse repository at this point
Copy the full SHA b90cdf9View commit details -
Use (better) guard for IEC559 code and constants
Clang doesn't defined __GCC_IEC_559, so we need to look at __STDC_IEC_559__. This is already implemented as COMPLETE_IEC559_SUPPORT in test_values.h, which we can reuse in the tests. For completeness, don't define named constants when their use is #ifdef'ed out. ChangeLog: * testsuite/tests/fpclassify.cc: Guard IEC559 special values with COMPLETE_IEC559_SUPPORT. * testsuite/tests/frexp.cc: Likewise.
Configuration menu - View commit details
-
Copy full SHA for 2015a03 - Browse repository at this point
Copy the full SHA 2015a03View commit details -
Disable simd execution policy for Clang < 17 and GCC >= 13
Clang < 17 cannot include <ranges> from GCC 13 in C++23 mode without breaking. ChangeLog: * vir/simd_execution.h: Guard against incompatible Clang and <ranges> header.
Configuration menu - View commit details
-
Copy full SHA for 630c97d - Browse repository at this point
Copy the full SHA 630c97dView commit details -
Fix simdize'd load&store on non-power-of-2 vir::stdx::simd
The problem didn't trigger with the libstdc++ stdx::simd because of the padding induced by alignment requirements, which then hit the sizeof condition. This is different for the array-based vir::stdx::simd implementation. ChangeLog: * vir/simdize.h: Move static_assert for power-of-2 number of elements into constexpr-if condition.
Configuration menu - View commit details
-
Copy full SHA for dfc1b1e - Browse repository at this point
Copy the full SHA dfc1b1eView commit details -
Print __PRETTY_FUNCTION__ of test function not helper lambda
On test failure, the COMPARE and ULP_COMPARE functions use __PRETTY_FUNCTION__ to print the function where the failure happened. As an implementation detail the macros internally use a directly invoked lambda. If __PRETTY_FUNCTION__ is inside that lambda then the compiler may emit the name of the lambda instead of the calling function. To get to see the latter, pass __PRETTY_FUNCTION__ as function argument to the lambda. ChangeLog: * testsuite/tests/bits/verify.h (COMPARE, ULP_COMPARE): Move __PRETTY_FUNCTION__ from inside the lambda to the lambda arguments.
Configuration menu - View commit details
-
Copy full SHA for a5eba09 - Browse repository at this point
Copy the full SHA a5eba09View commit details -
Default to -Wall -Wextra -Wpedantic
This way CI also tests these without depending on custom TESTFLAGS (or similar). ChangeLog: * Makefile: Add -Wall -Wextra -Wpedantic to the beginning of CXXFLAGS * vir/detail.h: Ignore -Wpedantic when uttering __int128. * vir/simd_execution.h: Remove stray semicolon.
Configuration menu - View commit details
-
Copy full SHA for 3bdabd9 - Browse repository at this point
Copy the full SHA 3bdabd9View commit details -
Disable permuting loads and stores for Clang 17
Clang 17 miscompiles a vinsertps call in some tests. It's fairly impossible to debug where this comes from. Any help from the compiler via e.g. -Og or -fsanitize makes the bug go away. ChangeLog: * vir/detail.h (VIR_HAVE_WORKING_SHUFFLEVECTOR): Renamed from VIR_HAVE_BUILTIN_SHUFFLEVECTOR. False for Clang 17. * vir/simd_permute.h: Rename to VIR_HAVE_BUILTIN_SHUFFLEVECTOR. * vir/simdize.h: Likewise.
Configuration menu - View commit details
-
Copy full SHA for 099475f - Browse repository at this point
Copy the full SHA 099475fView commit details -
Fix literals longer than one char and add literals tests
ChangeLog: * vir/constexpr_wrapper.h: Comparing arrays of different size is ill-formed; check for size and subscript value instead. * vir/test_constexpr_wrapper.cpp: Test all kinds of literals.
Configuration menu - View commit details
-
Copy full SHA for 387fe24 - Browse repository at this point
Copy the full SHA 387fe24View commit details