Tomasz Kaminski [Monday, 20 October 2025, 15:56:35 CEST]: > > On -O0 builds __builtin_constant_p(whatever) is unconditionally false, > > AFAIK. > > And yes, my main workflow is to verify asm output (while having unit test > > compiling in the background). > > That touches with my major concern, the user will be debugining (with > optimization disabled) a different code than one that will be used by > optimized > builds, and was having an issue. > That's why I prefer to have this localized in one place.
If the bug is in libstdc++ or a wrong-code bug in GCC, then yes, this is a problem. If the bug is in the user's code, then what difference does it make? But yes, testing the simd code requires us to test 1. constexpr 2. const-prop inputs 3. unknown inputs And for some binary operations it could make a difference whether one or both operands are const-prop. My test suite tries to cover all of these tests. -- ────────────────────────────────────────────────────────────────────────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Center for Heavy Ion Research https://gsi.de std::simd ──────────────────────────────────────────────────────────────────────────
