simde
simde copied to clipboard
Debian Bullseye buildflags ppc64le + gcc-10.2.1 + qemu: sse2/mm_cvtpd_ps fails
$ # gcc --version
gcc (Debian 9.3.0-13) 9.3.0
/x86/sse/mm_load_ps/emul/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/sse.c:2848: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= 726.849976)
/x86/sse/mm_loadh_pi/emul/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/sse.c:2953: assertion failed: r[2] ~= test_vec[i].r[2] (0.000000 ~= 777.770020)
/x86/sse/mm_loadr_ps/emul/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/sse.c:3026: assertion failed: r[0] ~= test_vec[i].r[0] (-4876649749282816.000000 ~= 779.229980)
/x86/sse/mm_load_ps/emul/cpp [ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/sse.cpp:2848: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= 726.849976)
/x86/sse/mm_loadh_pi/emul/cpp [ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/sse.cpp:2953: assertion failed: r[2] ~= test_vec[i].r[2] (0.000000 ~= 777.770020)
/x86/sse/mm_loadr_ps/emul/cpp [ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/sse.cpp:3026: assertion failed: r[0] ~= test_vec[i].r[0] (-4876649749282816.000000 ~= 779.229980)
/x86/avx/mm256_broadcast_pd/native/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/avx.c:2204: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= -996.030000)
/x86/avx/mm256_broadcast_ps/native/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/avx.c:2260: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= 350.600006)
/x86/avx/mm256_maskload_pd/native/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/avx.c:7411: assertion failed: r[1] ~= test_vec[i].r[1] (0.000000 ~= 662.930000)
/x86/avx/mm_maskload_ps/native/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/avx.c:7468: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= 238.880005)
/x86/avx/mm256_maskload_ps/native/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/avx.c:7565: assertion failed: r[3] ~= test_vec[i].r[3] (0.000000 ~= 88.589996)
/x86/avx/mm256_broadcast_pd/native/cpp[ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/avx.cpp:2204: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= -996.030000)
/x86/avx/mm256_broadcast_ps/native/cpp[ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/avx.cpp:2260: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= 350.600006)
/x86/avx/mm256_maskload_pd/native/cpp[ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/avx.cpp:7411: assertion failed: r[1] ~= test_vec[i].r[1] (0.000000 ~= 662.930000)
/x86/avx/mm_maskload_ps/native/cpp [ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/avx.cpp:7468: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= 238.880005)
/x86/avx/mm256_maskload_ps/native/cpp[ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/avx.cpp:7565: assertion failed: r[3] ~= test_vec[i].r[3] (0.000000 ~= 88.589996)
/x86/avx/mm256_broadcast_pd/emul/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/avx.c:2204: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= -996.030000)
/x86/avx/mm256_broadcast_ps/emul/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/avx.c:2260: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= 350.600006)
/x86/avx/mm256_maskload_pd/emul/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/avx.c:7411: assertion failed: r[1] ~= test_vec[i].r[1] (0.000000 ~= 662.930000)
/x86/avx/mm_maskload_ps/emul/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/avx.c:7468: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= 238.880005)
/x86/avx/mm256_maskload_ps/emul/c [ ERROR ]
/build/simde-0.0.0.git.20200608/test/x86/avx.c:7565: assertion failed: r[3] ~= test_vec[i].r[3] (0.000000 ~= 88.589996)
/x86/avx/mm256_broadcast_pd/emul/cpp [ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/avx.cpp:2204: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= -996.030000)
/x86/avx/mm256_broadcast_ps/emul/cpp [ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/avx.cpp:2260: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= 350.600006)
/x86/avx/mm256_maskload_pd/emul/cpp [ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/avx.cpp:7411: assertion failed: r[1] ~= test_vec[i].r[1] (0.000000 ~= 662.930000)
/x86/avx/mm_maskload_ps/emul/cpp [ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/avx.cpp:7468: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= 238.880005)
/x86/avx/mm256_maskload_ps/emul/cpp [ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/avx.cpp:7565: assertion failed: r[3] ~= test_vec[i].r[3] (0.000000 ~= 88.589996)
/build/simde-0.0.0.git.20200608/test/x86/sse2.c:3733: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= -851.110000)
/x86/sse2/mm_load_pd/emul/cpp [ ERROR ]
/build/simde-0.0.0.git.20200608/gcc_test/x86/sse2.cpp:3733: assertion failed: r[0] ~= test_vec[i].r[0] (0.000000 ~= -851.110000)
/usr/lib/ccache/gcc -DSIMDE_BUILD_CPP_TESTS -DSIMDE_NO_NATIVE -I/build/simde-0.0.0.git.20200608/test/.. -g -O2 -fdebug-prefix-map=/build/simde-0.0.0.git.20200608=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -std=gnu99 -Wno-psabi -Wno-psabi -o CMakeFiles/simde-test-emul.dir/x86/sse2.c.o -c /build/simde-0.0.0.git.20200608/test/x86/sse2.c
/usr/lib/ccache/gcc -DSIMDE_BUILD_CPP_TESTS -DSIMDE_NO_NATIVE -I/build/simde-0.0.0.git.20200608/test/.. -g -O2 -fdebug-prefix-map=/build/simde-0.0.0.git.20200608=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -std=gnu99 -Wno-psabi -Wno-psabi -o CMakeFiles/simde-test-emul.dir/x86/sse.c.o -c /build/simde-0.0.0.git.20200608/test/x86/sse.c
/usr/lib/ccache/gcc -DSIMDE_BUILD_CPP_TESTS -DSIMDE_NO_NATIVE -I/build/simde-0.0.0.git.20200608/test/.. -g -O2 -fdebug-prefix-map=/build/simde-0.0.0.git.20200608=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -std=gnu99 -Wno-psabi -Wno-psabi -o CMakeFiles/simde-test-emul.dir/x86/avx.c.o -c /build/simde-0.0.0.git.20200608/test/x86/avx.c
/usr/lib/ccache/gcc -DSIMDE_BUILD_CPP_TESTS -I/build/simde-0.0.0.git.20200608/test/.. -g -O2 -fdebug-prefix-map=/build/simde-0.0.0.git.20200608=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -std=gnu99 -Wno-psabi -Wno-psabi -o CMakeFiles/simde-test-native.dir/x86/sse.c.o -c /build/simde-0.0.0.git.20200608/test/x86/sse.c
/usr/lib/ccache/gcc -DSIMDE_BUILD_CPP_TESTS -I/build/simde-0.0.0.git.20200608/test/.. -g -O2 -fdebug-prefix-map=/build/simde-0.0.0.git.20200608=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -std=gnu99 -Wno-psabi -Wno-psabi -o CMakeFiles/simde-test-native.dir/x86/sse2.c.o -c /build/simde-0.0.0.git.20200608/test/x86/sse2.c
/usr/lib/ccache/gcc -DSIMDE_BUILD_CPP_TESTS -I/build/simde-0.0.0.git.20200608/test/.. -g -O2 -fdebug-prefix-map=/build/simde-0.0.0.git.20200608=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -std=gnu99 -Wno-psabi -Wno-psabi -o CMakeFiles/simde-test-native.dir/x86/avx.c.o -c /build/simde-0.0.0.git.20200608/test/x86/avx.c
See https://github.com/nemequ/simde/commit/24212b5acf00cad4510e0c4a765205f5ef8c6e46 for a reproducer
https://github.com/nemequ/simde/runs/749786299#step:3:1717
FWIW (very little probably) all tests pass with gcc 9.3.0 on Debian Bullseye on ARM64 (AArch64). But is there some particular non-standard or new flag that you suspect is causing the failure?
It's a GCC bug that only manifests with optimization enabled. It's probably architecture-specific, though I haven't tested.
Porting the failing tests to use the new style tests resolves the issue. Unfortunately reproducing is somewhat tricky; if I try to just get the µnit test runner out of the picture and compile a single file the problem goes away, which means it will be hard to get a minimal test case…
I'm almost done porting the tests, only the maskload functions remain. And, as an additional benefit, I got -DSIMDE_TEST_BARE
working so in the future it will hopefully be much easier to get creduce to give us reduced test cases for most bugs. Just not this one :(
This bug is preventing me from releasing an updated libsimde-dev
package in Debian :-(
I have the fix completed, I'm just trying to get everything through CI. It should be done soon.
With the latest commit https://github.com/nemequ/simde/commit/053960c99a4120a67d39d179ee7be2b9f76ea33b I get similar failings on ppc64le
And while it is nice that adjusting the tests made the failure go away, we need to file bugs with gcc as I think users could still run into this on their own..
Is this with qemu, or on real hardware?
I'm not seeing any failures on real hardware, but qemu is a different story…
This was real hardware. Did you test with https://github.com/nemequ/simde/commit/053960c99a4120a67d39d179ee7be2b9f76ea33b or a newer commit?
I'll go re-test with https://github.com/nemequ/simde/commit/72d1da815a6227c706381fdcfbcd492f91a8f4c0 now
https://github.com/nemequ/simde/commit/72d1da815a6227c706381fdcfbcd492f91a8f4c0 (most current commit as of right now) passes on real ppc64le hardware
Using qemu-ppc64le version 5.0.0 (Debian 1:5.0-5)
I get 8 failures, all sse2
/x86/sse2/mm_cvtpd_ps/native/c [ ERROR ]
/home/michael/src/simde/test/x86/sse2.c:2944: assertion failed: r[0] ~= test_vec[i].r[0] (-0.000000 ~= 689.409973)
/x86/sse2/mm_cvttpd_pi32/native/c [ ERROR ]
/home/michael/src/simde/test/x86/sse2.c:3452: assertion failed: r[0] != test_vec[i].r[0] (-16711681 != 302)
/x86/sse2/mm_cvtpd_ps/native/cpp [ ERROR ]
/home/michael/src/simde/test/build_ppc64le/x86/sse2.cpp:2944: assertion failed: r[0] ~= test_vec[i].r[0] (-0.000000 ~= 689.409973)
/x86/sse2/mm_cvttpd_pi32/native/cpp [ ERROR ]
/home/michael/src/simde/test/build_ppc64le/x86/sse2.cpp:3452: assertion failed: r[0] != test_vec[i].r[0] (-16711681 != 302)
/x86/sse2/mm_cvtpd_ps/emul/c [ ERROR ]
/home/michael/src/simde/test/x86/sse2.c:2944: assertion failed: r[0] ~= test_vec[i].r[0] (-0.000000 ~= 689.409973)
/x86/sse2/mm_cvttpd_pi32/emul/c [ ERROR ]
/home/michael/src/simde/test/x86/sse2.c:3452: assertion failed: r[0] != test_vec[i].r[0] (-16711681 != 302)
/x86/sse2/mm_cvtpd_ps/emul/cpp [ ERROR ]
/home/michael/src/simde/test/build_ppc64le/x86/sse2.cpp:2944: assertion failed: r[0] ~= test_vec[i].r[0] (-0.000000 ~= 689.409973)
/x86/sse2/mm_cvttpd_pi32/emul/cpp [ ERROR ]
/home/michael/src/simde/test/build_ppc64le/x86/sse2.cpp:3452: assertion failed: r[0] != test_vec[i].r[0] (-16711681 != 302)
For the record, the older commit ( https://github.com/nemequ/simde/commit/053960c99a4120a67d39d179ee7be2b9f76ea33b ) had one failure on real ppc64le hardware:
/x86/sse/mm_loadr_ps/emul/cpp [ ERROR ]
/home/michael/src/simde/test/build_ppc64le/x86/sse.cpp:3050: assertion failed: r[0] ~= simde_mm_loadu_ps(test_vec[i].r)[0] (-934.210022 ~= 785.080017)
The tests pass as of SIMDe 0.7.0-rc.1
as of simde 0.7.2 the mm_cvtpd_ps
tests are failing on qemu 5.2+dfsg-3 + gcc 10.2.1-6