Implementation notes: amd64, hydra8, crypto_kem/frodokem976aes

Computer: hydra8
Microarchitecture: amd64; Ivy Bridge+AES (306a9)
Architecture: amd64
CPU ID: GenuineIntel-000306a9-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_kem
Primitive: frodokem976aes
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
974401135705 38 054814 932 1760T:optimizedgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
1011565837234 24 056098 956 1728T:optimizedclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
1033871822525 24 043322 956 1728T:optimizedclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
1069797720665 24 040194 956 1728T:optimizedclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
142444569591 24 026356 948 1728T:optimizedclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
3117464312438 24 029594 956 1728T:optimizedclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
4106696310922 38 028798 932 1760T:optimizedgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
4794634010429 38 028014 932 1760T:optimizedgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
564043009406 38 025838 924 1728T:optimizedgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212

Compiler output

Implementation: T:x64
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
frodo976.c: In file included from frodo976.c:32:
frodo976.c: ./frodo_macrify.inc:112:28: error: always_inline function '_mm256_madd_epi16' requires target feature 'avx2', but would be inlined into function 'frodo_mul_add_sa_plus_e' that is compiled without support for 'avx2'
frodo976.c: a[0] = _mm256_madd_epi16(a[0], b);
frodo976.c: ^
frodo976.c: ./frodo_macrify.inc:113:30: error: always_inline function '_mm256_add_epi16' requires target feature 'avx2', but would be inlined into function 'frodo_mul_add_sa_plus_e' that is compiled without support for 'avx2'
frodo976.c: acc[0] = _mm256_add_epi16(a[0], acc[0]);
frodo976.c: ^
frodo976.c: ./frodo_macrify.inc:115:28: error: always_inline function '_mm256_madd_epi16' requires target feature 'avx2', but would be inlined into function 'frodo_mul_add_sa_plus_e' that is compiled without support for 'avx2'
frodo976.c: a[1] = _mm256_madd_epi16(a[1], b);
frodo976.c: ^
frodo976.c: ./frodo_macrify.inc:116:30: error: always_inline function '_mm256_add_epi16' requires target feature 'avx2', but would be inlined into function 'frodo_mul_add_sa_plus_e' that is compiled without support for 'avx2'
frodo976.c: acc[1] = _mm256_add_epi16(a[1], acc[1]);
frodo976.c: ^
frodo976.c: ./frodo_macrify.inc:118:28: error: always_inline function '_mm256_madd_epi16' requires target feature 'avx2', but would be inlined into function 'frodo_mul_add_sa_plus_e' that is compiled without support for 'avx2'
frodo976.c: a[2] = _mm256_madd_epi16(a[2], b);
frodo976.c: ^
frodo976.c: ./frodo_macrify.inc:119:30: error: always_inline function '_mm256_add_epi16' requires target feature 'avx2', but would be inlined into function 'frodo_mul_add_sa_plus_e' that is compiled without support for 'avx2'
frodo976.c: acc[2] = _mm256_add_epi16(a[2], acc[2]);
frodo976.c: ^
frodo976.c: ./frodo_macrify.inc:121:28: error: always_inline function '_mm256_madd_epi16' requires target feature 'avx2', but would be inlined into function 'frodo_mul_add_sa_plus_e' that is compiled without support for 'avx2'
frodo976.c: a[3] = _mm256_madd_epi16(a[3], b);
frodo976.c: ^
frodo976.c: ./frodo_macrify.inc:122:30: error: always_inline function '_mm256_add_epi16' requires target feature 'avx2', but would be inlined into function 'frodo_mul_add_sa_plus_e' that is compiled without support for 'avx2'
frodo976.c: acc[3] = _mm256_add_epi16(a[3], acc[3]);
frodo976.c: ^
frodo976.c: ...

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

Compiler output

Implementation: T:x64
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
aes_ni.c: aes_ni.c:35:16: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes_ni.c: schedule[1] = key_exp(schedule[0], 0x01);
aes_ni.c: ^
aes_ni.c: aes_ni.c:28:40: note: expanded from macro 'key_exp'
aes_ni.c: #define key_exp(k, rcon) key_expand(k, _mm_aeskeygenassist_si128(k, rcon))
aes_ni.c: ^
aes_ni.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: note: expanded from macro '_mm_aeskeygenassist_si128'
aes_ni.c: ((__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R)))
aes_ni.c: ^
aes_ni.c: aes_ni.c:36:16: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes_ni.c: schedule[2] = key_exp(schedule[1], 0x02);
aes_ni.c: ^
aes_ni.c: aes_ni.c:28:40: note: expanded from macro 'key_exp'
aes_ni.c: #define key_exp(k, rcon) key_expand(k, _mm_aeskeygenassist_si128(k, rcon))
aes_ni.c: ^
aes_ni.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: note: expanded from macro '_mm_aeskeygenassist_si128'
aes_ni.c: ((__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R)))
aes_ni.c: ^
aes_ni.c: aes_ni.c:37:16: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes_ni.c: schedule[3] = key_exp(schedule[2], 0x04);
aes_ni.c: ^
aes_ni.c: aes_ni.c:28:40: note: expanded from macro 'key_exp'
aes_ni.c: #define key_exp(k, rcon) key_expand(k, _mm_aeskeygenassist_si128(k, rcon))
aes_ni.c: ^
aes_ni.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: note: expanded from macro '_mm_aeskeygenassist_si128'
aes_ni.c: ...

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

Compiler output

Implementation: T:x64
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
frodo976.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
frodo976.c: from frodo_macrify.inc:8,
frodo976.c: from frodo976.c:32:
frodo976.c: frodo_macrify.inc: In function 'frodo_mul_add_sa_plus_e':
frodo976.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:112:1: error: inlining failed in call to 'always_inline' '_mm256_add_epi16': target specific option mismatch
frodo976.c: 112 | _mm256_add_epi16 (__m256i __A, __m256i __B)
frodo976.c: | ^~~~~~~~~~~~~~~~
frodo976.c: In file included from frodo976.c:32:
frodo976.c: frodo_macrify.inc:122:30: note: called from here
frodo976.c: 122 | acc[3] = _mm256_add_epi16(a[3], acc[3]);
frodo976.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
frodo976.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
frodo976.c: from frodo_macrify.inc:8,
frodo976.c: from frodo976.c:32:
frodo976.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:341:1: error: inlining failed in call to 'always_inline' '_mm256_madd_epi16': target specific option mismatch
frodo976.c: 341 | _mm256_madd_epi16 (__m256i __A, __m256i __B)
frodo976.c: | ^~~~~~~~~~~~~~~~~
frodo976.c: In file included from frodo976.c:32:
frodo976.c: frodo_macrify.inc:121:28: note: called from here
frodo976.c: 121 | a[3] = _mm256_madd_epi16(a[3], b);
frodo976.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~
frodo976.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
frodo976.c: from frodo_macrify.inc:8,
frodo976.c: from frodo976.c:32:
frodo976.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:112:1: error: inlining failed in call to 'always_inline' '_mm256_add_epi16': target specific option mismatch
frodo976.c: ...

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