Implementation notes: amd64, saber214, crypto_kem/titaniumccalite

Computer: saber214
Microarchitecture: amd64; Bulldozer (600f20)
Architecture: amd64
CPU ID: AuthenticAMD-00600f20-1789c3f5
SUPERCOP version: 20240107
Operation: crypto_kem
Primitive: titaniumccalite
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
585795581948 0 36191678 840 1600T:optclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122320231212
585844662080 0 36169414 840 1600T:optclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122320231212
624922276399 0 64185180 800 1664T:optgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122320231212
627206637777 0 36144048 832 1600T:optclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122320231212
643319055821 0 36164846 840 1600T:optclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122320231212
675952437574 0 36144254 840 1600T:optclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122320231212
701323641299 0 64148916 800 1664T:optgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122320231212
720765940585 0 64147828 800 1664T:optgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122320231212
53609462756263 0 36165278 840 1600T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122320231212
54757614530242 0 36136376 832 1600T:refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122320231212
549468542105863 0 36215942 840 1600T:refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122320231212
55177649842284 0 36149982 840 1600T:refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122320231212
56591141130036 0 36136654 840 1600T:refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122320231212
62450154257460 0 64166228 800 1664T:refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122320231212
62464495930482 0 64137964 800 1664T:refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122320231212
72648341830761 0 64137852 800 1664T:refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122320231212

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.c: encrypt.c:66:8: error: always_inline function '_mm256_mul_epu32' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c: t = _mm256_mul_epu32(u, v);
encrypt.c: ^
encrypt.c: encrypt.c:81:8: error: always_inline function '_mm256_add_epi64' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c: t = _mm256_add_epi64(u, v);
encrypt.c: ^
encrypt.c: encrypt.c:82:9: error: always_inline function '_mm256_mul_epu32' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c: t1 = _mm256_mul_epu32(t, V_B4Q_B4Q_B4Q_B4Q);
encrypt.c: ^
encrypt.c: encrypt.c:83:9: error: always_inline function '_mm256_srli_epi64' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c: t1 = _mm256_srli_epi64(t1, BARRETT_BITSHIFT_4Q);
encrypt.c: ^
encrypt.c: encrypt.c:84:9: error: always_inline function '_mm256_mul_epu32' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c: t1 = _mm256_mul_epu32(t1, V_Q_Q_Q_Q);
encrypt.c: ^
encrypt.c: encrypt.c:85:8: error: always_inline function '_mm256_sub_epi64' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c: t = _mm256_sub_epi64(t, t1);
encrypt.c: ^
encrypt.c: 6 errors generated.

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

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.c: encrypt.c:64:8: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx'
encrypt.c: u = _mm256_loadu_si256((__m256i *)(a[i] + j));
encrypt.c: ^
encrypt.c: encrypt.c:64:8: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:65:8: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx'
encrypt.c: v = _mm256_loadu_si256((__m256i *)(s + j));
encrypt.c: ^
encrypt.c: encrypt.c:65:8: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:66:8: error: always_inline function '_mm256_mul_epu32' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c: t = _mm256_mul_epu32(u, v);
encrypt.c: ^
encrypt.c: encrypt.c:66:8: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:67:4: error: always_inline function '_mm256_storeu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx'
encrypt.c: _mm256_storeu_si256((__m256i *)(a[i] + j), t);
encrypt.c: ^
encrypt.c: encrypt.c:67:4: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:79:8: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx'
encrypt.c: u = _mm256_loadu_si256((__m256i *)(a[i] + j));
encrypt.c: ^
encrypt.c: encrypt.c:79:8: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:80:8: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx'
encrypt.c: v = _mm256_loadu_si256((__m256i *)(e[i] + j));
encrypt.c: ^
encrypt.c: encrypt.c:80:8: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:81:8: error: always_inline function '_mm256_add_epi64' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c: ...

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

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
encrypt.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
encrypt.c: from encrypt.c:18:
encrypt.c: encrypt.c: In function 'crypto_encrypt_keypair':
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:567:1: error: inlining failed in call to 'always_inline' '_mm256_mul_epu32': target specific option mismatch
encrypt.c: 567 | _mm256_mul_epu32 (__m256i __A, __m256i __B)
encrypt.c: | ^~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:66:29: note: called from here
encrypt.c: 66 | t = _mm256_mul_epu32(u, v);
encrypt.c: | ^~~~~~~~~~~~~~~~~~~~~~
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
encrypt.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
encrypt.c: from encrypt.c:18:
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:567:1: error: inlining failed in call to 'always_inline' '_mm256_mul_epu32': target specific option mismatch
encrypt.c: 567 | _mm256_mul_epu32 (__m256i __A, __m256i __B)
encrypt.c: | ^~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:66:29: note: called from here
encrypt.c: 66 | t = _mm256_mul_epu32(u, v);
encrypt.c: | ^~~~~~~~~~~~~~~~~~~~~~
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
encrypt.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
encrypt.c: from encrypt.c:18:
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:822:1: error: inlining failed in call to 'always_inline' '_mm256_sub_epi64': target specific option mismatch
encrypt.c: 822 | _mm256_sub_epi64 (__m256i __A, __m256i __B)
encrypt.c: | ^~~~~~~~~~~~~~~~
encrypt.c: ...

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

Compiler output

Implementation: T:opt
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(encrypt.o): in function `crypto_encrypt_keypair':
try.c: encrypt.c:(.text+0x...): undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: encrypt.c:(.text+0x...): undefined reference to `barrett_4q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(encrypt.o): in function `crypto_encrypt':
try.c: encrypt.c:(.text+0x...): undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: encrypt.c:(.text+0x...): undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(encrypt.o): in function `crypto_encrypt_open':
try.c: encrypt.c:(.text+0x...): undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(fastrandombytes.o): in function `fastrandombytes':
try.c: fastrandombytes.c:(.text+0x...): undefined reference to `load_32'
try.c: /usr/bin/ld: fastrandombytes.c:(.text+0x...): undefined reference to `store_32'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_1024_1536':
try.c: ntt.c:(.text+0x...): undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_1536_768':
try.c: ntt.c:(.text+0x...): undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_512_1280':
try.c: ntt.c:(.text+0x...): undefined reference to `barrett_4q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_1024_1280':
try.c: ntt.c:(.text+0x...): undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_1280_1280_inv':
try.c: ntt.c:(.text+0x...): undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_768_768_inv':
try.c: ntt.c:(.text+0x...): undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_512_768':
try.c: ntt.c:(.text+0x...): undefined reference to `barrett_4q'
try.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:opt

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(fastrandombytes.o): in function `fastrandombytes':
try.c: fastrandombytes.c:(.text+0x...): undefined reference to `load_32'
try.c: /usr/bin/ld: fastrandombytes.c:(.text+0x...): undefined reference to `store_32'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(sampler.o): in function `sampler_zq':
try.c: sampler.c:(.text+0x...): undefined reference to `load_24'
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref