Implementation notes: amd64, jasper, crypto_kem/kyber90s768

Computer: jasper
Microarchitecture: amd64; Tremont (906c0)
Architecture: amd64
CPU ID: GenuineIntel-000906c0-20-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_kem
Primitive: kyber90s768
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
101045562342 0 081328 820 1720refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
101645651866 0 069880 820 1720refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
103785365818 0 086120 820 1720refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
106687641310 0 057590 812 1720refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
115749659733 0 079112 788 1752refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107
123908742802 0 061216 788 1752refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107
126542341988 0 059792 788 1752refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107
138254642458 0 059502 812 1720refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
174107640196 0 056120 780 1720refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107

Compiler output

Implementation: avx2
Security model: constbranchindex
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
cbd.c: cbd.c:20:26: error: always_inline function '_mm256_set1_epi32' requires target feature 'avx', but would be inlined into function 'cbd2' that is compiled without support for 'avx'
cbd.c: const __m256i mask55 = _mm256_set1_epi32(0x55555555);
cbd.c: ^
cbd.c: cbd.c:20:26: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
cbd.c: cbd.c:21:26: error: always_inline function '_mm256_set1_epi32' requires target feature 'avx', but would be inlined into function 'cbd2' that is compiled without support for 'avx'
cbd.c: const __m256i mask33 = _mm256_set1_epi32(0x33333333);
cbd.c: ^
cbd.c: cbd.c:21:26: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
cbd.c: cbd.c:22:26: error: always_inline function '_mm256_set1_epi32' requires target feature 'avx', but would be inlined into function 'cbd2' that is compiled without support for 'avx'
cbd.c: const __m256i mask03 = _mm256_set1_epi32(0x03030303);
cbd.c: ^
cbd.c: cbd.c:22:26: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
cbd.c: cbd.c:23:26: error: always_inline function '_mm256_set1_epi32' requires target feature 'avx', but would be inlined into function 'cbd2' that is compiled without support for 'avx'
cbd.c: const __m256i mask0F = _mm256_set1_epi32(0x0F0F0F0F);
cbd.c: ^
cbd.c: cbd.c:23:26: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
cbd.c: cbd.c:26:10: error: always_inline function '_mm256_load_si256' requires target feature 'avx', but would be inlined into function 'cbd2' that is compiled without support for 'avx'
cbd.c: f0 = _mm256_load_si256(&buf[i]);
cbd.c: ^
cbd.c: cbd.c:26:10: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
cbd.c: cbd.c:28:10: error: always_inline function '_mm256_srli_epi16' requires target feature 'avx2', but would be inlined into function 'cbd2' that is compiled without support for 'avx2'
cbd.c: f1 = _mm256_srli_epi16(f0, 1);
cbd.c: ^
cbd.c: cbd.c:28:10: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
cbd.c: cbd.c:29:10: error: always_inline function '_mm256_and_si256' requires target feature 'avx2', but would be inlined into function 'cbd2' that is compiled without support for 'avx2'
cbd.c: ...

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

Compiler output

Implementation: avx2
Security model: constbranchindex
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
aes256ctr.c: aes256ctr.c:90:3: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes256ctr.c: BLOCK1(0x01);
aes256ctr.c: ^
aes256ctr.c: aes256ctr.c:71:11: note: expanded from macro 'BLOCK1'
aes256ctr.c: temp1 = _mm_aeskeygenassist_si128(temp2, IMM); \
aes256ctr.c: ^
aes256ctr.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/__wmmintrin_aes.h:136:12: note: expanded from macro '_mm_aeskeygenassist_si128'
aes256ctr.c: (__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R))
aes256ctr.c: ^
aes256ctr.c: aes256ctr.c:91:3: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes256ctr.c: BLOCK2(0x01);
aes256ctr.c: ^
aes256ctr.c: aes256ctr.c:81:11: note: expanded from macro 'BLOCK2'
aes256ctr.c: temp1 = _mm_aeskeygenassist_si128(temp0, IMM); \
aes256ctr.c: ^
aes256ctr.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/__wmmintrin_aes.h:136:12: note: expanded from macro '_mm_aeskeygenassist_si128'
aes256ctr.c: (__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R))
aes256ctr.c: ^
aes256ctr.c: aes256ctr.c:93:3: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes256ctr.c: BLOCK1(0x02);
aes256ctr.c: ^
aes256ctr.c: aes256ctr.c:71:11: note: expanded from macro 'BLOCK1'
aes256ctr.c: temp1 = _mm_aeskeygenassist_si128(temp2, IMM); \
aes256ctr.c: ^
aes256ctr.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/__wmmintrin_aes.h:136:12: note: expanded from macro '_mm_aeskeygenassist_si128'
aes256ctr.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE avx2

Compiler output

Implementation: avx2
Security model: constbranchindex
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
cbd.c: cbd.c: In function 'cbd2':
cbd.c: cbd.c:20:17: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
cbd.c: 20 | const __m256i mask55 = _mm256_set1_epi32(0x55555555);
cbd.c: | ^~~~~~
cbd.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:51,
cbd.c: from cbd.c:2:
cbd.c: /usr/lib/gcc/x86_64-linux-gnu/10/include/avxintrin.h:1319:1: error: inlining failed in call to 'always_inline' '_mm256_set1_epi32': target specific option mismatch
cbd.c: 1319 | _mm256_set1_epi32 (int __A)
cbd.c: | ^~~~~~~~~~~~~~~~~
cbd.c: cbd.c:23:26: note: called from here
cbd.c: 23 | const __m256i mask0F = _mm256_set1_epi32(0x0F0F0F0F);
cbd.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cbd.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:51,
cbd.c: from cbd.c:2:
cbd.c: /usr/lib/gcc/x86_64-linux-gnu/10/include/avxintrin.h:1319:1: error: inlining failed in call to 'always_inline' '_mm256_set1_epi32': target specific option mismatch
cbd.c: 1319 | _mm256_set1_epi32 (int __A)
cbd.c: | ^~~~~~~~~~~~~~~~~
cbd.c: cbd.c:22:26: note: called from here
cbd.c: 22 | const __m256i mask03 = _mm256_set1_epi32(0x03030303);
cbd.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cbd.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:51,
cbd.c: from cbd.c:2:
cbd.c: /usr/lib/gcc/x86_64-linux-gnu/10/include/avxintrin.h:1319:1: error: inlining failed in call to 'always_inline' '_mm256_set1_epi32': target specific option mismatch
cbd.c: 1319 | _mm256_set1_epi32 (int __A)
cbd.c: | ^~~~~~~~~~~~~~~~~
cbd.c: ...

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