Implementation notes: amd64, beelink, crypto_aead/grain128aeadv2

Computer: beelink
Microarchitecture: amd64; Zen3 (a50f00)
Architecture: amd64
CPU ID: AuthenticAMD-00a50f00-178bfbff
SUPERCOP version: 20221122
Operation: crypto_aead
Primitive: grain128aeadv2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
14344727918 0 048212 892 1056T:sseclang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023010320221122
14345527950 0 048260 892 1056T:sseclang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023010320221122
14392810798 0 024876 892 1024T:sseclang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023010320221122
14532110303 0 025082 884 1088T:sseclang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023010320221122
14932313323 0 028693 804 1120T:sseg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023010320221122
15150611275 0 026060 796 1120T:sseg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023010320221122
15304916721 0 034021 804 1120T:sseg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023010320221122
1624344220 0 017824 780 1088T:sseg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023010320221122
27011134208 0 054588 892 1056T:x64clang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023010320221122
27127334208 0 054572 892 1056T:x64clang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023010320221122
2820987179 0 022533 804 1120T:x64g++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023010320221122
2879596754 0 021516 796 1120T:x64g++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023010320221122
3118715696 0 019820 892 1024T:x64clang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023010320221122
3176915027 0 019834 884 1088T:x64clang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023010320221122
3626852627 0 016208 780 1088T:x64g++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023010320221122

Checksum failure

Implementation: T:x64
Security model: timingleaks
Compiler: g++ -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE
d0dd6234d89dbd95039a8c1c4e9e8f6fa0d58228afa4fda263447f76c3102a36
Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
g++ -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:x64

Compiler output

Implementation: T:avx512
Security model: timingleaks
Compiler: clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:236:6: error: '__builtin_ia32_pternlogq128_mask' needs target feature avx512vl
grain128aead-v2_opt.cpp: T = _xorand3(_mm_srli_epi16(X, 1), X, _mm_set1_epi16(0x2222));
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:125:27: note: expanded from macro '_xorand3'
grain128aead-v2_opt.cpp: #define _xorand3(a, b, c) _mm_ternarylogic_epi64(a, b, c, 0x28)
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx512vlintrin.h:6565:13: note: expanded from macro '_mm_ternarylogic_epi64'
grain128aead-v2_opt.cpp: ((__m128i)__builtin_ia32_pternlogq128_mask((__v2di)(__m128i)(A), \
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:237:6: error: '__builtin_ia32_pternlogq128_mask' needs target feature avx512vl
grain128aead-v2_opt.cpp: X = _xor3(_mm_slli_epi16(T, 1), X, T);
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:122:25: note: expanded from macro '_xor3'
grain128aead-v2_opt.cpp: #define _xor3(a, b, c) _mm_ternarylogic_epi64(a, b, c, 0x96)
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx512vlintrin.h:6565:13: note: expanded from macro '_mm_ternarylogic_epi64'
grain128aead-v2_opt.cpp: ((__m128i)__builtin_ia32_pternlogq128_mask((__v2di)(__m128i)(A), \
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:238:6: error: '__builtin_ia32_pternlogq128_mask' needs target feature avx512vl
grain128aead-v2_opt.cpp: T = _xorand3(_mm_srli_epi16(X, 2), X, _mm_set1_epi16(0x0c0c));
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:125:27: note: expanded from macro '_xorand3'
grain128aead-v2_opt.cpp: #define _xorand3(a, b, c) _mm_ternarylogic_epi64(a, b, c, 0x28)
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx512vlintrin.h:6565:13: note: expanded from macro '_mm_ternarylogic_epi64'
grain128aead-v2_opt.cpp: ...

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

Compiler output

Implementation: T:avx512
Security model: timingleaks
Compiler: g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
grain128aead-v2_opt.cpp: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:57,
grain128aead-v2_opt.cpp: from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
grain128aead-v2_opt.cpp: from grain128aead-v2_opt.h:41,
grain128aead-v2_opt.cpp: from grain128aead-v2_opt.cpp:10:
grain128aead-v2_opt.cpp: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx512vlintrin.h: In function 'u64 grain_keystream64(grain_ctx*)':
grain128aead-v2_opt.cpp: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx512vlintrin.h:10647:1: error: inlining failed in call to 'always_inline' '__m128i _mm_ternarylogic_epi64(__m128i, __m128i, __m128i, int)': target specific option mismatch
grain128aead-v2_opt.cpp: 10647 | _mm_ternarylogic_epi64 (__m128i __A, __m128i __B, __m128i __C,
grain128aead-v2_opt.cpp: | ^~~~~~~~~~~~~~~~~~~~~~
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:207:39: note: called from here
grain128aead-v2_opt.cpp: 207 | u64 y = ys ^ _mm_cvtsi128_si64(_xor2(shr8(_xor3(_andxor3(s4, s7, s5), _and3(ts, b7, s6), b1), 7), shr8(_andxor3(shr8(b7, 2), s2, b1), 5)));
grain128aead-v2_opt.cpp: | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
grain128aead-v2_opt.cpp: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:57,
grain128aead-v2_opt.cpp: from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
grain128aead-v2_opt.cpp: from grain128aead-v2_opt.h:41,
grain128aead-v2_opt.cpp: from grain128aead-v2_opt.cpp:10:
grain128aead-v2_opt.cpp: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx512vlintrin.h:10647:1: error: inlining failed in call to 'always_inline' '__m128i _mm_ternarylogic_epi64(__m128i, __m128i, __m128i, int)': target specific option mismatch
grain128aead-v2_opt.cpp: 10647 | _mm_ternarylogic_epi64 (__m128i __A, __m128i __B, __m128i __C,
grain128aead-v2_opt.cpp: | ^~~~~~~~~~~~~~~~~~~~~~
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:207:39: note: called from here
grain128aead-v2_opt.cpp: 207 | u64 y = ys ^ _mm_cvtsi128_si64(_xor2(shr8(_xor3(_andxor3(s4, s7, s5), _and3(ts, b7, s6), b1), 7), shr8(_andxor3(shr8(b7, 2), s2, b1), 5)));
grain128aead-v2_opt.cpp: | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
grain128aead-v2_opt.cpp: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:57,
grain128aead-v2_opt.cpp: from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
grain128aead-v2_opt.cpp: from grain128aead-v2_opt.h:41,
grain128aead-v2_opt.cpp: from grain128aead-v2_opt.cpp:10:
grain128aead-v2_opt.cpp: ...

Number of similar (compiler,implementation) pairs: 8, namely:
CompilerImplementations
g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:avx512
g++ -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:avx512
g++ -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:avx512
g++ -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:avx512
g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gf2
g++ -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gf2
g++ -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gf2
g++ -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gf2

Compiler output

Implementation: T:gf2
Security model: timingleaks
Compiler: clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:234:6: error: '__builtin_ia32_vgf2p8affineqb_v16qi' needs target feature gfni
grain128aead-v2_opt.cpp: X = _mm_gf2p8affine_epi64_epi8(X, _mm_set1_epi64x(0x0104104002082080ULL), 0);
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: /usr/lib/llvm-14/lib/clang/14.0.0/include/gfniintrin.h:36:13: note: expanded from macro '_mm_gf2p8affine_epi64_epi8'
grain128aead-v2_opt.cpp: ((__m128i)__builtin_ia32_vgf2p8affineqb_v16qi((__v16qi)(__m128i)(A), \
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:241:6: error: '__builtin_ia32_pternlogq128_mask' needs target feature avx512vl
grain128aead-v2_opt.cpp: T = _xorand3(_mm_srli_epi16(X, 4), X, _mm_set1_epi16(0x00f0));
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:125:27: note: expanded from macro '_xorand3'
grain128aead-v2_opt.cpp: #define _xorand3(a, b, c) _mm_ternarylogic_epi64(a, b, c, 0x28)
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx512vlintrin.h:6565:13: note: expanded from macro '_mm_ternarylogic_epi64'
grain128aead-v2_opt.cpp: ((__m128i)__builtin_ia32_pternlogq128_mask((__v2di)(__m128i)(A), \
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:242:6: error: '__builtin_ia32_pternlogq128_mask' needs target feature avx512vl
grain128aead-v2_opt.cpp: X = _xor3(_mm_slli_epi16(T, 4), X, T);
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:122:25: note: expanded from macro '_xor3'
grain128aead-v2_opt.cpp: #define _xor3(a, b, c) _mm_ternarylogic_epi64(a, b, c, 0x96)
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx512vlintrin.h:6565:13: note: expanded from macro '_mm_ternarylogic_epi64'
grain128aead-v2_opt.cpp: ((__m128i)__builtin_ia32_pternlogq128_mask((__v2di)(__m128i)(A), \
grain128aead-v2_opt.cpp: ^
grain128aead-v2_opt.cpp: grain128aead-v2_opt.cpp:155:30: error: '__builtin_ia32_pternlogq128_mask' needs target feature avx512vl
grain128aead-v2_opt.cpp: ...

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