Implementation notes: amd64, hiphop, crypto_aead/grain128aeadv2

Computer: hiphop
Microarchitecture: amd64; Haswell+AES (306c3)
Architecture: amd64
CPU ID: GenuineIntel-000306c3-bfebfbff
SUPERCOP version: 20231107
Operation: crypto_aead
Primitive: grain128aeadv2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
16239820366 0 037629 892 1056T:sseclang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
16252410574 0 024445 892 1024T:sseclang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
16292020350 0 037333 892 1056T:sseclang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
16464810318 0 024911 884 1088T:sseclang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
17123113243 0 028357 804 1120T:sseg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
17155811282 0 026060 796 1120T:sseg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
17306116625 0 033765 804 1120T:sseg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
1748504220 0 017808 780 1088T:sseg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
31918510050 0 027397 892 1056T:x64clang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
31936110050 0 027117 892 1056T:x64clang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
3210266761 0 021516 796 1120T:x64g++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
3257885544 0 019453 892 1024T:x64clang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
3279145078 0 019711 884 1088T:x64clang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
3524187068 0 022165 804 1120T:x64g++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
3701512627 0 016192 780 1088T:x64g++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107

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