Implementation notes: amd64, hydra8, crypto_sign/dilithium5aes

Computer: hydra8
Microarchitecture: amd64; Ivy Bridge+AES (306a9)
Architecture: amd64
CPU ID: GenuineIntel-000306a9-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_sign
Primitive: dilithium5aes
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
668330645801 0 067128 868 1728refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
674230043931 0 063960 868 1728refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
696137236427 0 055800 868 1728refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
697776850322 0 069725 812 1792refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
703682523441 0 040538 860 1728refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
734923026700 0 044304 868 1728refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
736554026651 0 044997 812 1792refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
823645925199 0 043141 812 1792refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
1161692123611 0 040445 804 1760refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212

Compiler output

Implementation: avx2
Security model: constbranchindex
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
poly.c: poly.c:50:9: error: always_inline function '_mm256_add_epi32' requires target feature 'avx2', but would be inlined into function 'crypto_sign_dilithium5aes_avx2_constbranchindex_poly_reduce' that is compiled without support for 'avx2'
poly.c: g = _mm256_add_epi32(f,off);
poly.c: ^
poly.c: poly.c:51:9: error: always_inline function '_mm256_srai_epi32' requires target feature 'avx2', but would be inlined into function 'crypto_sign_dilithium5aes_avx2_constbranchindex_poly_reduce' that is compiled without support for 'avx2'
poly.c: g = _mm256_srai_epi32(g,23);
poly.c: ^
poly.c: poly.c:52:9: error: always_inline function '_mm256_mullo_epi32' requires target feature 'avx2', but would be inlined into function 'crypto_sign_dilithium5aes_avx2_constbranchindex_poly_reduce' that is compiled without support for 'avx2'
poly.c: g = _mm256_mullo_epi32(g,q);
poly.c: ^
poly.c: poly.c:53:9: error: always_inline function '_mm256_sub_epi32' requires target feature 'avx2', but would be inlined into function 'crypto_sign_dilithium5aes_avx2_constbranchindex_poly_reduce' that is compiled without support for 'avx2'
poly.c: f = _mm256_sub_epi32(f,g);
poly.c: ^
poly.c: 4 errors generated.

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-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: 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-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: 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-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: 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
poly.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
poly.c: from poly.c:2:
poly.c: poly.c: In function 'crypto_sign_dilithium5aes_avx2_constbranchindex_poly_reduce':
poly.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:815:1: error: inlining failed in call to 'always_inline' '_mm256_sub_epi32': target specific option mismatch
poly.c: 815 | _mm256_sub_epi32 (__m256i __A, __m256i __B)
poly.c: | ^~~~~~~~~~~~~~~~
poly.c: poly.c:53:9: note: called from here
poly.c: 53 | f = _mm256_sub_epi32(f,g);
poly.c: | ^~~~~~~~~~~~~~~~~~~~~
poly.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
poly.c: from poly.c:2:
poly.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:560:1: error: inlining failed in call to 'always_inline' '_mm256_mullo_epi32': target specific option mismatch
poly.c: 560 | _mm256_mullo_epi32 (__m256i __A, __m256i __B)
poly.c: | ^~~~~~~~~~~~~~~~~~
poly.c: poly.c:52:9: note: called from here
poly.c: 52 | g = _mm256_mullo_epi32(g,q);
poly.c: | ^~~~~~~~~~~~~~~~~~~~~~~
poly.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
poly.c: from poly.c:2:
poly.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:724:1: error: inlining failed in call to 'always_inline' '_mm256_srai_epi32': target specific option mismatch
poly.c: 724 | _mm256_srai_epi32 (__m256i __A, int __B)
poly.c: | ^~~~~~~~~~~~~~~~~
poly.c: poly.c:51:9: note: called from here
poly.c: 51 | g = _mm256_srai_epi32(g,23);
poly.c: | ^~~~~~~~~~~~~~~~~~~~~~~
poly.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