Implementation notes: amd64, margaux, crypto_encode/857x3

Computer: margaux
Microarchitecture: amd64; Core 2 65nm (6fb)
Architecture: amd64
CPU ID: GenuineIntel-000006fb-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_encode
Primitive: 857x3
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
565837 0 013229 804 960refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
1035167 0 012547 844 896refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
1037166 0 011643 844 896refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
1037166 0 012755 844 896refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
1068123 0 010307 844 896refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
1077173 0 010972 796 960refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
1100106 0 09485 836 896refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
1159182 0 011413 804 960refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
1528151 0 09928 780 928refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212

Compiler output

Implementation: avx
Security model: constbranchindex
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encode.c: encode.c:26:18: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encode_857x3_avx_constbranchindex' that is compiled without support for 'avx'
encode.c: __m256i f0 = _mm256_loadu_si256((const __m256i *) (f+0));
encode.c: ^
encode.c: encode.c:26:18: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:27:18: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encode_857x3_avx_constbranchindex' that is compiled without support for 'avx'
encode.c: __m256i f1 = _mm256_loadu_si256((const __m256i *) (f+32));
encode.c: ^
encode.c: encode.c:27:18: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:28:18: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encode_857x3_avx_constbranchindex' that is compiled without support for 'avx'
encode.c: __m256i f2 = _mm256_loadu_si256((const __m256i *) (f+64));
encode.c: ^
encode.c: encode.c:28:18: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:29:18: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encode_857x3_avx_constbranchindex' that is compiled without support for 'avx'
encode.c: __m256i f3 = _mm256_loadu_si256((const __m256i *) (f+96));
encode.c: ^
encode.c: encode.c:29:18: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:33:18: error: always_inline function '_mm256_packus_epi16' requires target feature 'avx2', but would be inlined into function 'crypto_encode_857x3_avx_constbranchindex' that is compiled without support for 'avx2'
encode.c: __m256i a0 = _mm256_packus_epi16(f0&lobytes,f1&lobytes);
encode.c: ^
encode.c: encode.c:33:18: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:36:38: error: always_inline function '_mm256_srli_epi16' requires target feature 'avx2', but would be inlined into function 'crypto_encode_857x3_avx_constbranchindex' that is compiled without support for 'avx2'
encode.c: __m256i a1 = _mm256_packus_epi16(_mm256_srli_epi16(f0,8),_mm256_srli_epi16(f1,8));
encode.c: ^
encode.c: encode.c:36:38: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encode.c: encode.c:36:62: error: always_inline function '_mm256_srli_epi16' requires target feature 'avx2', but would be inlined into function 'crypto_encode_857x3_avx_constbranchindex' that is compiled without support for 'avx2'
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_857x3_avx_constbranchindex':
encode.c: encode.c:26:13: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
encode.c: 26 | __m256i f0 = _mm256_loadu_si256((const __m256i *) (f+0));
encode.c: | ^~
encode.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:43,
encode.c: from encode.c:1:
encode.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avxintrin.h:933:1: error: inlining failed in call to 'always_inline' '_mm256_storeu_si256': target specific option mismatch
encode.c: 933 | _mm256_storeu_si256 (__m256i_u *__P, __m256i __A)
encode.c: | ^~~~~~~~~~~~~~~~~~~
encode.c: encode.c:56:5: note: called from here
encode.c: 56 | _mm256_storeu_si256((__m256i *) s,b0);
encode.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encode.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
encode.c: from encode.c:1:
encode.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:105:1: error: inlining failed in call to 'always_inline' '_mm256_add_epi8': target specific option mismatch
encode.c: 105 | _mm256_add_epi8 (__m256i __A, __m256i __B)
encode.c: | ^~~~~~~~~~~~~~~
encode.c: encode.c:54:10: note: called from here
encode.c: 54 | b0 = _mm256_add_epi8(b0,_mm256_set1_epi8(85));
encode.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encode.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:43,
encode.c: from encode.c:1:
encode.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avxintrin.h:1340:1: error: inlining failed in call to 'always_inline' '_mm256_set1_epi8': target specific option mismatch
encode.c: 1340 | _mm256_set1_epi8 (char __A)
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