Implementation notes: amd64, margaux, crypto_core/weightsntrup857

Computer: margaux
Microarchitecture: amd64; Core 2 65nm (6fb)
Architecture: amd64
CPU ID: GenuineIntel-000006fb-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_core
Primitive: weightsntrup857
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
347363 0 013339 844 928refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
347363 0 014451 844 928refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
347363 0 014259 844 928refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
442400 0 014461 804 992refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
1901190 0 012700 796 992refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
1902103 0 011755 844 928refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
190590 0 010965 836 928refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
1993188 0 013077 804 992refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
3951168 0 011472 780 960refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212

Compiler output

Implementation: avx
Security model: constbranchindex
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
weight.c: weight.c:20:9: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_core_weightsntrup857_avx_constbranchindex' that is compiled without support for 'avx'
weight.c: sum = _mm256_loadu_si256((__m256i *) (in+p-32));
weight.c: ^
weight.c: weight.c:20:9: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
weight.c: weight.c:21:10: error: always_inline function '_mm256_set_epi8' requires target feature 'avx', but would be inlined into function 'crypto_core_weightsntrup857_avx_constbranchindex' that is compiled without support for 'avx'
weight.c: sum &= endingmask;
weight.c: ^
weight.c: ./params.h:2:20: note: expanded from macro 'endingmask'
weight.c: #define endingmask _mm256_set_epi8(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0)
weight.c: ^
weight.c: weight.c:21:10: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
weight.c: ./params.h:2:20: note: expanded from macro 'endingmask'
weight.c: #define endingmask _mm256_set_epi8(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0)
weight.c: ^
weight.c: weight.c:24:20: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_core_weightsntrup857_avx_constbranchindex' that is compiled without support for 'avx'
weight.c: __m256i bits = _mm256_loadu_si256((__m256i *) in);
weight.c: ^
weight.c: weight.c:24:20: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
weight.c: weight.c:25:13: error: always_inline function '_mm256_set1_epi8' requires target feature 'avx', but would be inlined into function 'crypto_core_weightsntrup857_avx_constbranchindex' that is compiled without support for 'avx'
weight.c: bits &= _mm256_set1_epi8(1);
weight.c: ^
weight.c: weight.c:25:13: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
weight.c: weight.c:26:11: error: always_inline function '_mm256_add_epi8' requires target feature 'avx2', but would be inlined into function 'crypto_core_weightsntrup857_avx_constbranchindex' that is compiled without support for 'avx2'
weight.c: sum = _mm256_add_epi8(sum,bits);
weight.c: ^
weight.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
weight.c: weight.c: In function 'crypto_core_weightsntrup857_avx_constbranchindex':
weight.c: weight.c:20:7: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
weight.c: 20 | sum = _mm256_loadu_si256((__m256i *) (in+p-32));
weight.c: | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weight.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:43,
weight.c: from weight.c:1:
weight.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avxintrin.h:1285:1: error: inlining failed in call to 'always_inline' '_mm256_set_epi8': target specific option mismatch
weight.c: 1285 | _mm256_set_epi8 (char __q31, char __q30, char __q29, char __q28,
weight.c: | ^~~~~~~~~~~~~~~
weight.c: In file included from weight.c:10:
weight.c: params.h:2:20: note: called from here
weight.c: 2 | #define endingmask _mm256_set_epi8(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0)
weight.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weight.c: weight.c:21:10: note: in expansion of macro 'endingmask'
weight.c: 21 | sum &= endingmask;
weight.c: | ^~~~~~~~~~
weight.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:43,
weight.c: from weight.c:1:
weight.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avxintrin.h:927:1: error: inlining failed in call to 'always_inline' '_mm256_loadu_si256': target specific option mismatch
weight.c: 927 | _mm256_loadu_si256 (__m256i_u const *__P)
weight.c: | ^~~~~~~~~~~~~~~~~~
weight.c: weight.c:20:9: note: called from here
weight.c: 20 | sum = _mm256_loadu_si256((__m256i *) (in+p-32));
weight.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weight.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
weight.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