simd-everywhere / simde

Implementations of SIMD instruction sets for systems which don't natively support them.
https://simd-everywhere.github.io/blog/
MIT License
2.32k stars 239 forks source link

Add GCC Armv8-A 32-bit test in CI & fix issues #1116

Closed Cuda-Chen closed 5 months ago

Cuda-Chen commented 8 months ago

Close #1106.

mr-c commented 8 months ago

Congratulations, you have found a compiler bug in GCC 12.3.0!

FAILED: test/arm/neon/add-native-cpp.p/meson-generated_.._add.cpp.o 
arm-linux-gnueabihf-g++-12 -Itest/arm/neon/add-native-cpp.p -Itest/arm/neon -I../test/arm/neon -I. -I.. -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -g -mcpu=cortex-a32 -mfpu=crypto-neon-fp-armv8 -Wextra -Werror -fopenmp-simd -DSIMDE_CONSTRAINED_COMPILATION -DSIMDE_ENABLE_OPENMP -Wno-psabi -DSIMDE_TEST_BARE -MD -MQ test/arm/neon/add-native-cpp.p/meson-generated_.._add.cpp.o -MF test/arm/neon/add-native-cpp.p/meson-generated_.._add.cpp.o.d -o test/arm/neon/add-native-cpp.p/meson-generated_.._add.cpp.o -c test/arm/neon/add.cpp
during RTL pass: expand
test/arm/neon/add.cpp: In function ‘int test_simde_vaddq_p128()’:
test/arm/neon/add.cpp:2054:7: internal compiler error: in expand_shift_1, at expmed.cc:2680
 2054 |     a = a << 64;
      |     ~~^~~~~~~~~
0x180394b internal_error(char const*, ...)
    ???:0
0x646a1c fancy_abort(char const*, int, char const*)
    ???:0
0x9f64b7 expand_variable_shift(tree_code, machine_mode, rtx_def*, tree_node*, rtx_def*, int)
    ???:0
0xa06ead expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier)
    ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.

https://github.com/simd-everywhere/simde/actions/runs/7211555742/job/19647295647#step:9:1177

Cuda-Chen commented 8 months ago

Hi @mr-c,

Thanks for your assistance! While submitting the bug report to GCC, I will try different GCC version so that we can first merge this PR without encountering any GCC bugs.

Cuda-Chen commented 8 months ago

Hi @mr-c,

Thanks for your assistance! While submitting the bug report to GCC, I will try different GCC version so that we can first merge this PR without encountering any GCC bugs.

After my testing, the error still exists when compiling with GCC 11.4.0 or 10.5.0. I will first file the bug report to GCC.

mr-c commented 7 months ago

@Cuda-Chen Any update?

Cuda-Chen commented 7 months ago

Hi @mr-c ,

It seems that GCC part does not have any updates. For convenience, I attach the bug tracking ticket here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113065

mr-c commented 7 months ago

@Cuda-Chen Thanks for filing the GCC bug! I've added a workaround, lets see if that is enough.

Cuda-Chen commented 6 months ago

Hi @mr-c ,

Sorry for the late reply. It seems that the simde_x_aes_inv_s_box fails as the compiler cannot find the declaration. I think we can try to dig in from here.

mr-c commented 5 months ago

Thank you @Cuda-Chen !