While trying to optimize aws-checksums (AVX512 branch) with avx512 instructions, found that compiling them requires -mavx512vl compile flags.
Expected Behavior
aws-c-common to add -mavx512vl to compile flags if its available.
Current Behavior
Compile failures in aws-checksums AVX512 branch.
In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:57,
from /home/badari/aws-checksums/source/intel/intrin/crc32c_sse42_avx512.c:12:
/home/badari/aws-checksums/source/intel/intrin/crc32c_sse42_avx512.c: In function ‘aws_checksums_crc32c_avx512’:
/usr/lib/gcc/x86_64-linux-gnu/11/include/avx512vlintrin.h:7558:1: error: inlining failed in call to ‘always_inline’ ‘_mm_xor_epi64’: target specific option mismatch
7558 | _mm_xor_epi64 (m128i A, m128i B)
| ^~~~~
/home/badari/aws-checksums/source/intel/intrin/crc32c_sse42_avx512.c:144:10: note: called from here
144 | a1 = _mm_xor_epi64(a1, _mm512_castsi512_si128(x0));
| ^~~~~~~~~~~~~
Reproduction Steps
Try to build AVX512 branch of aws-checksums project
Describe the bug
While trying to optimize aws-checksums (AVX512 branch) with avx512 instructions, found that compiling them requires -mavx512vl compile flags.
Expected Behavior
aws-c-common to add -mavx512vl to compile flags if its available.
Current Behavior
Compile failures in aws-checksums AVX512 branch.
In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:57, from /home/badari/aws-checksums/source/intel/intrin/crc32c_sse42_avx512.c:12: /home/badari/aws-checksums/source/intel/intrin/crc32c_sse42_avx512.c: In function ‘aws_checksums_crc32c_avx512’: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx512vlintrin.h:7558:1: error: inlining failed in call to ‘always_inline’ ‘_mm_xor_epi64’: target specific option mismatch 7558 | _mm_xor_epi64 (m128i A, m128i B) | ^
~~~~ /home/badari/aws-checksums/source/intel/intrin/crc32c_sse42_avx512.c:144:10: note: called from here 144 | a1 = _mm_xor_epi64(a1, _mm512_castsi512_si128(x0)); | ^~~~~~~~~~~~~Reproduction Steps
Try to build AVX512 branch of aws-checksums project
Possible Solution
Additional Information/Context
No response
aws-c-common version used
latest git
Compiler and version used
gcc version 11.4.0
Operating System and version
Ubuntu 22.04