Implementation notes: amd64, jasper, crypto_aead/triadaev1

Computer: jasper
Microarchitecture: amd64; Tremont (906c0)
Architecture: amd64
CPU ID: GenuineIntel-000906c0-20-bfebfbff
SUPERCOP version: 20240425
Operation: crypto_aead
Primitive: triadaev1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
603772910439 0 026026 788 1080T:refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024042720240425
63885528527 0 022922 788 1080T:refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024042720240425
65286785170 0 017973 764 1048T:refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024042720240425
2212657221840 0 039296 812 1016T:refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024042720240425
2346272413312 0 028464 812 1016T:refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024042720240425
2616031121131 0 037304 812 1016T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024042720240425
380182816383 0 020198 804 1016T:refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024042720240425
398071427135 0 020414 804 1016T:refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024042720240425
429894386228 0 020135 772 1080T:refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024042720240425

Compiler output

Implementation: T:add_avx
Security model: timingleaks
Compiler: clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
simd.cpp: simd.cpp:152:5: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
simd.cpp: _mm256_set_epi8(0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
simd.cpp: ^
simd.cpp: simd.cpp:153:5: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
simd.cpp: _mm256_set_epi8(0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
simd.cpp: ^
simd.cpp: simd.cpp:154:5: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
simd.cpp: _mm256_set_epi8(0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
simd.cpp: ^
simd.cpp: simd.cpp:155:5: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
simd.cpp: _mm256_set_epi8(0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
simd.cpp: ^
simd.cpp: simd.cpp:156:5: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
simd.cpp: _mm256_set_epi8(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
simd.cpp: ^
simd.cpp: simd.cpp:157:5: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
simd.cpp: _mm256_set_epi8(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
simd.cpp: ^
simd.cpp: simd.cpp:158:5: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
simd.cpp: _mm256_set_epi8(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)};
simd.cpp: ^
simd.cpp: 7 errors generated.

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

Compiler output

Implementation: T:add_avx
Security model: timingleaks
Compiler: g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
simd.cpp: simd.cpp: In function 'void triad_high_speed_encryption(unsigned char*, const unsigned char*, long long unsigned int, const unsigned char*, long long unsigned int, const unsigned char*, const unsigned char*)':
simd.cpp: simd.cpp:400:11: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
simd.cpp: 400 | in[2] = _mm256_load_si256((const __m256i *)(tmp0));
simd.cpp: | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simd.cpp: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
simd.cpp: from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
simd.cpp: from simd.cpp:16:
simd.cpp: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h: In function 'void triad_update_encryption(const __m256i*, __m256i*) [with int i = 7]':
simd.cpp: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:207:1: error: inlining failed in call to 'always_inline' '__m256i _mm256_blendv_epi8(__m256i, __m256i, __m256i)': target specific option mismatch
simd.cpp: 207 | _mm256_blendv_epi8 (__m256i __X, __m256i __Y, __m256i __M)
simd.cpp: | ^~~~~~~~~~~~~~~~~~
simd.cpp: simd.cpp:224:32: note: called from here
simd.cpp: 224 | out[1] = _mm256_blendv_epi8(out[1], newb, BlendMask256List[i - 1]);
simd.cpp: | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simd.cpp: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
simd.cpp: from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
simd.cpp: from simd.cpp:16:
simd.cpp: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:746:1: error: inlining failed in call to 'always_inline' '__m256i _mm256_srli_si256(__m256i, int)': target specific option mismatch
simd.cpp: 746 | _mm256_srli_si256 (__m256i __A, const int __N)
simd.cpp: | ^~~~~~~~~~~~~~~~~
simd.cpp: simd.cpp:223:31: note: called from here
simd.cpp: 223 | out[1] = _mm256_srli_si256(in[1], i);
simd.cpp: | ~~~~~~~~~~~~~~~~~^~~~~~~~~~
simd.cpp: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
simd.cpp: from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
simd.cpp: ...

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

Compiler output

Implementation: T:add_sse
Security model: timingleaks
Compiler: clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
simd.cpp: simd.cpp:237:12: error: always_inline function '_mm_broadcastq_epi64' requires target feature 'avx2', but would be inlined into function 'triad_high_speed_encryption' that is compiled without support for 'avx2'
simd.cpp: inR[0] = _mm_broadcastq_epi64(in[0]);
simd.cpp: ^
simd.cpp: simd.cpp:238:12: error: always_inline function '_mm_broadcastq_epi64' requires target feature 'avx2', but would be inlined into function 'triad_high_speed_encryption' that is compiled without support for 'avx2'
simd.cpp: inR[1] = _mm_broadcastq_epi64(in[1]);
simd.cpp: ^
simd.cpp: simd.cpp:239:12: error: always_inline function '_mm_broadcastq_epi64' requires target feature 'avx2', but would be inlined into function 'triad_high_speed_encryption' that is compiled without support for 'avx2'
simd.cpp: inR[2] = _mm_broadcastq_epi64(in[2]);
simd.cpp: ^
simd.cpp: simd.cpp:317:12: error: '__builtin_ia32_pblendd128' needs target feature avx2
simd.cpp: inL[0] = _mm_blend_epi32(inL[0], s1024L[0], 0xC);
simd.cpp: ^
simd.cpp: /usr/lib/llvm-11/lib/clang/11.0.1/include/avx2intrin.h:746:12: note: expanded from macro '_mm_blend_epi32'
simd.cpp: (__m128i)__builtin_ia32_pblendd128((__v4si)(__m128i)(V1), \
simd.cpp: ^
simd.cpp: simd.cpp:318:12: error: '__builtin_ia32_pblendd128' needs target feature avx2
simd.cpp: inL[1] = _mm_blend_epi32(inL[1], s1024L[1], 0xC);
simd.cpp: ^
simd.cpp: /usr/lib/llvm-11/lib/clang/11.0.1/include/avx2intrin.h:746:12: note: expanded from macro '_mm_blend_epi32'
simd.cpp: (__m128i)__builtin_ia32_pblendd128((__v4si)(__m128i)(V1), \
simd.cpp: ^
simd.cpp: simd.cpp:319:12: error: '__builtin_ia32_pblendd128' needs target feature avx2
simd.cpp: inL[2] = _mm_blend_epi32(inL[2], s1024L[2], 0xC);
simd.cpp: ^
simd.cpp: /usr/lib/llvm-11/lib/clang/11.0.1/include/avx2intrin.h:746:12: note: expanded from macro '_mm_blend_epi32'
simd.cpp: ...

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

Compiler output

Implementation: T:add_sse
Security model: timingleaks
Compiler: g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
simd.cpp: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
simd.cpp: from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
simd.cpp: from simd.cpp:16:
simd.cpp: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h: In function 'void triad_high_speed_encryption(unsigned char*, const unsigned char*, long long unsigned int, const unsigned char*, long long unsigned int, const unsigned char*, const unsigned char*)':
simd.cpp: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:1034:1: error: inlining failed in call to 'always_inline' '__m128i _mm_broadcastq_epi64(__m128i)': target specific option mismatch
simd.cpp: 1034 | _mm_broadcastq_epi64 (__m128i __X)
simd.cpp: | ^~~~~~~~~~~~~~~~~~~~
simd.cpp: simd.cpp:237:32: note: called from here
simd.cpp: 237 | inR[0] = _mm_broadcastq_epi64(in[0]);
simd.cpp: | ~~~~~~~~~~~~~~~~~~~~^~~~~~~
simd.cpp: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
simd.cpp: from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
simd.cpp: from simd.cpp:16:
simd.cpp: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:1034:1: error: inlining failed in call to 'always_inline' '__m128i _mm_broadcastq_epi64(__m128i)': target specific option mismatch
simd.cpp: 1034 | _mm_broadcastq_epi64 (__m128i __X)
simd.cpp: | ^~~~~~~~~~~~~~~~~~~~
simd.cpp: simd.cpp:238:32: note: called from here
simd.cpp: 238 | inR[1] = _mm_broadcastq_epi64(in[1]);
simd.cpp: | ~~~~~~~~~~~~~~~~~~~~^~~~~~~
simd.cpp: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
simd.cpp: from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
simd.cpp: from simd.cpp:16:
simd.cpp: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:1034:1: error: inlining failed in call to 'always_inline' '__m128i _mm_broadcastq_epi64(__m128i)': target specific option mismatch
simd.cpp: 1034 | _mm_broadcastq_epi64 (__m128i __X)
simd.cpp: | ^~~~~~~~~~~~~~~~~~~~
simd.cpp: ...

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