https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97149
Bug ID: 97149 Summary: sincos failed to be vectorized by gcc Product: gcc Version: 10.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: kangshan0910 at hotmail dot com Target Milestone: --- My code pattern is: for (unsigned int i = 0; i < loopCount; i++) { for (unsigned int j = i * dim; j < (i + 1) * dim; j++) { sincos(input_array[j], &result_arrays[j], &result_arrayc[j]); } } And I compiled the code with the following options: gcc -m64 -g -O2 -fPIC -Wall test_sincos.c -o test_sincos -lm -march=skylake-avx512 -ffast-math -ftree-loop-vectorize $ ldd test_sincos linux-vdso.so.1 (0x00007ffd2393f000) libm.so.6 => /lib64/libm.so.6 (0x00007f574f49d000) libc.so.6 => /lib64/libc.so.6 (0x00007f574f2a2000) /lib64/ld-linux-x86-64.so.2 (0x00007f574f601000) You can find the the libmvec.so is not linked. I tried other functions such as sin, cos, log... with the same code pattern and they can be vectorized by gcc. But sincos cannot. Is there anything I missed? My gcc version is "10.1.1 20200507".