Implementation notes: amd64, gcc123, crypto_sign/dilithium5aes

Computer: gcc123
Architecture: amd64
CPU ID: GenuineIntel-000206d7-bfebfbff
SUPERCOP version: 20220213
Operation: crypto_sign
Primitive: dilithium5aes
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
713150345891 0 066194 820 1736refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2021020820210125
720647246886 0 069402 820 1736refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2021020820210125
771436437911 0 058714 820 1736refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2021020820210125
772441844821 0 064399 836 1768refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2021020820210125
772541337911 0 058714 820 1736refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2021020820210125
791803923469 0 040600 812 1736refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2021020820210125
860389824662 0 042951 836 1768refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2021020820210125
877528123703 0 041743 836 1768refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2021020820210125
913788221477 0 038503 828 1736refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2021020820210125

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