Implementation notes: amd64, raptor, crypto_aead/grain128aeadv2

Computer: raptor
Microarchitecture: amd64; Raptor Cove (b06a2)
Architecture: amd64
CPU ID: GenuineIntel-000b06a2-40-bfebfbff
SUPERCOP version: 20231107
Operation: crypto_aead
Primitive: grain128aeadv2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
14372810232 0 024537 796 1096T:sseclang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110820230530
14474516317 0 033711 804 1064T:sseclang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110820230530
14697910365 0 023951 804 1032T:sseclang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110820230530
14775816317 0 033599 804 1064T:sseclang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110820230530
15566412121 0 025694 788 1128T:sseg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110820230530
15792413401 0 027311 796 1128T:sseg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110820230530
15794417335 0 033311 796 1128T:sseg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110820230530
1597214131 0 016438 772 1096T:sseg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110820230530
3050839804 0 027287 804 1064T:x64clang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110820230530
3056375152 0 019481 796 1096T:x64clang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110820230530
3070505532 0 019167 804 1032T:x64clang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110820230530
30931011146 0 028495 804 1064T:x64clang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110820230530
3110046525 0 020086 788 1128T:x64g++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110820230530
3467172482 0 014758 772 1096T:x64g++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110820230530
3859747069 0 020975 796 1128T:x64g++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110820230530

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/lib64/clang/16/include/avx512vlintrin.h:6559:13: note: expanded from macro '_mm_ternarylogic_epi64'
grain128aead-v2_opt.cpp: ((__m128i)__builtin_ia32_pternlogq128_mask( \
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/lib64/clang/16/include/avx512vlintrin.h:6559:13: note: expanded from macro '_mm_ternarylogic_epi64'
grain128aead-v2_opt.cpp: ((__m128i)__builtin_ia32_pternlogq128_mask( \
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/lib64/clang/16/include/avx512vlintrin.h:6559: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-redhat-linux/13/include/immintrin.h:61,
grain128aead-v2_opt.cpp: from /usr/lib/gcc/x86_64-redhat-linux/13/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-redhat-linux/13/include/avx512vlintrin.h: In function 'u64 grain_keystream64(grain_ctx*)':
grain128aead-v2_opt.cpp: /usr/lib/gcc/x86_64-redhat-linux/13/include/avx512vlintrin.h:10657: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: 10657 | _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: /usr/lib/gcc/x86_64-redhat-linux/13/include/avx512vlintrin.h:10657: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: 10657 | _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: /usr/lib/gcc/x86_64-redhat-linux/13/include/avx512vlintrin.h:10657: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: 10657 | _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: /usr/lib/gcc/x86_64-redhat-linux/13/include/avx512vlintrin.h:10657: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: 10657 | _mm_ternarylogic_epi64 (__m128i __A, __m128i __B, __m128i __C,
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: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/lib64/clang/16/include/avx512vlintrin.h:6559:13: note: expanded from macro '_mm_ternarylogic_epi64'
grain128aead-v2_opt.cpp: ((__m128i)__builtin_ia32_pternlogq128_mask( \
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/lib64/clang/16/include/avx512vlintrin.h:6559:13: note: expanded from macro '_mm_ternarylogic_epi64'
grain128aead-v2_opt.cpp: ((__m128i)__builtin_ia32_pternlogq128_mask( \
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: u64 ss = _mm_cvtsi128_si64( _xor3(s0, s7, s6_4));
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/lib64/clang/16/include/avx512vlintrin.h:6559: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: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