Implementation notes: amd64, nucnuc, crypto_encode/761xfreeze3

Computer: nucnuc
Microarchitecture: amd64; Airmont (406c3)
Architecture: amd64
CPU ID: GenuineIntel-000406c3-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_encode
Primitive: 761xfreeze3
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
15601390 0 013048 780 952refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122120231217
2629535 0 012880 812 888refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122120231217
4151360 0 011464 812 888refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122120231217
4151360 0 013112 812 888refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122120231217
531696 0 09678 804 888refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122120231217
614895 0 09259 756 920refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122120231217
6262109 0 010207 772 952refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122120231217
6663191 0 010286 804 888refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122120231217
6732113 0 010648 780 952refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122120231217

Compiler output

Implementation: avx
Security model: constbranchindex
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encode.c: encode.c:15:19: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encode_761xfreeze3_avx_constbranchindex' that is compiled without support for 'avx'
encode.c: __m256i x = _mm256_loadu_si256((__m256i *) r);
encode.c: ^
encode.c: encode.c:15:19: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:16:41: error: always_inline function '_mm256_set1_epi16' requires target feature 'avx', but would be inlined into function 'crypto_encode_761xfreeze3_avx_constbranchindex' that is compiled without support for 'avx'
encode.c: __m256i y = _mm256_mulhrs_epi16(x,_mm256_set1_epi16(10923));
encode.c: ^
encode.c: encode.c:16:41: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:16:19: error: always_inline function '_mm256_mulhrs_epi16' requires target feature 'avx2', but would be inlined into function 'crypto_encode_761xfreeze3_avx_constbranchindex' that is compiled without support for 'avx2'
encode.c: __m256i y = _mm256_mulhrs_epi16(x,_mm256_set1_epi16(10923));
encode.c: ^
encode.c: encode.c:16:19: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:17:11: error: always_inline function '_mm256_sub_epi16' requires target feature 'avx2', but would be inlined into function 'crypto_encode_761xfreeze3_avx_constbranchindex' that is compiled without support for 'avx2'
encode.c: x = _mm256_sub_epi16(x,y);
encode.c: ^
encode.c: encode.c:17:11: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:18:11: error: always_inline function '_mm256_add_epi16' requires target feature 'avx2', but would be inlined into function 'crypto_encode_761xfreeze3_avx_constbranchindex' that is compiled without support for 'avx2'
encode.c: y = _mm256_add_epi16(y,y);
encode.c: ^
encode.c: encode.c:18:11: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:19:11: error: always_inline function '_mm256_sub_epi16' requires target feature 'avx2', but would be inlined into function 'crypto_encode_761xfreeze3_avx_constbranchindex' that is compiled without support for 'avx2'
encode.c: x = _mm256_sub_epi16(x,y);
encode.c: ^
encode.c: encode.c:19:11: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:20:20: error: '__builtin_ia32_vextractf128_si256' needs target feature avx
encode.c: ...

Number of similar (compiler,implementation) pairs: 5, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE avx
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE avx
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE avx
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE avx
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE avx

Compiler output

Implementation: avx
Security model: constbranchindex
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
encode.c: encode.c: In function 'crypto_encode_761xfreeze3_avx_constbranchindex':
encode.c: encode.c:15:15: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
encode.c: 15 | __m256i x = _mm256_loadu_si256((__m256i *) r);
encode.c: | ^
encode.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:51,
encode.c: from encode.c:1:
encode.c: /usr/lib/gcc/x86_64-linux-gnu/10/include/avxintrin.h:523:1: error: inlining failed in call to 'always_inline' '_mm256_extractf128_si256': target specific option mismatch
encode.c: 523 | _mm256_extractf128_si256 (__m256i __X, const int __N)
encode.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
encode.c: encode.c:21:20: note: called from here
encode.c: 21 | __m128i x1 = _mm256_extractf128_si256(x,1);
encode.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encode.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:51,
encode.c: from encode.c:1:
encode.c: /usr/lib/gcc/x86_64-linux-gnu/10/include/avxintrin.h:523:1: error: inlining failed in call to 'always_inline' '_mm256_extractf128_si256': target specific option mismatch
encode.c: 523 | _mm256_extractf128_si256 (__m256i __X, const int __N)
encode.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
encode.c: encode.c:20:20: note: called from here
encode.c: 20 | __m128i x0 = _mm256_extractf128_si256(x,0);
encode.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encode.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
encode.c: from encode.c:1:
encode.c: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:808:1: error: inlining failed in call to 'always_inline' '_mm256_sub_epi16': target specific option mismatch
encode.c: 808 | _mm256_sub_epi16 (__m256i __A, __m256i __B)
encode.c: | ^~~~~~~~~~~~~~~~
encode.c: ...

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE avx
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE avx
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE avx
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE avx