Implementation notes: amd64, hertz, crypto_stream/simon128128ctr

Computer: hertz
Microarchitecture: amd64; Zen 4 (a60f12)
Architecture: amd64
CPU ID: AuthenticAMD-00a60f12-178bfbff
SUPERCOP version: 20240716
Operation: crypto_stream
Primitive: simon128128ctr
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
262589843 0 0109438 828 1032T:avx2clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
277989899 0 0109606 828 1032T:avx2clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
4594110374 0 0126589 804 1096T:sse4gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
465886608 0 0106182 828 1032T:sse4clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
467986624 0 0106310 828 1032T:sse4clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
4797109186 0 0123365 804 1032T:avx2gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
494989255 0 0102720 820 1032T:avx2clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
5739109196 0 0121696 780 1000T:avx2gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
7860110052 0 0124205 804 1032T:sse4gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
863285943 0 099456 820 1032T:sse4clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
9682118469 0 0130920 780 1000T:sse4gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716

Compiler output


stream.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/13/include/immintrin.h:51,
stream.c:                  from Intrinsics_AVX2_128block.h:5,
stream.c:                  from Simon128128AVX2.h:17,
stream.c:                  from stream.c:21:
stream.c: In function '_mm256_unpackhi_epi64',
stream.c:     inlined from 'Encrypt' at stream.c:165:22:
stream.c: /usr/lib/gcc/x86_64-linux-gnu/13/include/avx2intrin.h:880:19: warning: 'X[1]' may be used uninitialized [-Wmaybe-uninitialized]
stream.c:   880 |   return (__m256i)__builtin_ia32_punpckhqdq256 ((__v4di)__A, (__v4di)__B);
stream.c:       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stream.c: stream.c: In function 'Encrypt':
stream.c: stream.c:110:8: note: 'X[1]' was declared here
stream.c:   110 |   u256 X[8],Y[8];
stream.c:       |        ^
stream.c: In function '_mm256_unpackhi_epi64',
stream.c:     inlined from 'Encrypt' at stream.c:166:22:
stream.c: /usr/lib/gcc/x86_64-linux-gnu/13/include/avx2intrin.h:880:19: warning: 'X[2]' may be used uninitialized [-Wmaybe-uninitialized]
stream.c:   880 |   return (__m256i)__builtin_ia32_punpckhqdq256 ((__v4di)__A, (__v4di)__B);
stream.c:       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stream.c: stream.c: In function 'Encrypt':
stream.c: stream.c:110:8: note: 'X[2]' was declared here
stream.c:   110 |   u256 X[8],Y[8];
stream.c:       |        ^
stream.c: In function '_mm256_unpackhi_epi64',
stream.c:     inlined from 'Encrypt' at stream.c:167:22:
stream.c: /usr/lib/gcc/x86_64-linux-gnu/13/include/avx2intrin.h:880:19: warning: 'X[3]' may be used uninitialized [-Wmaybe-uninitialized]
stream.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)

Compiler output


stream.c: stream.c:324:58: warning: argument 'T' of type '__m128i[8]' with mismatched bound [-Warray-parameter]
stream.c:   324 | inline __attribute__((always_inline)) int Transpose(u128 T[8])
stream.c:       |                                                          ^
stream.c: stream.c:28:58: note: previously declared as '__m128i[]' here
stream.c:    28 | inline __attribute__((always_inline)) int Transpose(u128 M[]);
stream.c:       |                                                          ^
stream.c: 1 warning generated.

Number of similar (implementation,compiler) pairs: 3, namely:
ImplementationCompiler
T:sse4clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
T:sse4clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
T:sse4clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))

Compiler output


stream.c: stream.c:324:58: warning: argument 1 of type '__m128i[8]' with mismatched bound [-Warray-parameter=]
stream.c:   324 | inline __attribute__((always_inline)) int Transpose(u128 T[8])
stream.c: stream.c:28:58: note: previously declared as '__m128i[]'
stream.c:    28 | inline __attribute__((always_inline)) int Transpose(u128 M[]);

Number of similar (implementation,compiler) pairs: 3, namely:
ImplementationCompiler
T:sse4gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
T:sse4gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
T:sse4gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)

Namespace violations


stream.o Encrypt T
stream.o Encrypt_Xor T
stream.o ExpandKeyBS T
stream.o ExpandKeyNBS T

Number of similar (implementation,compiler) pairs: 5, namely:
ImplementationCompiler
T:avx2clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
T:avx2clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
T:avx2clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
T:avx2gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
T:avx2gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)

Namespace violations


stream.o ExpandKeyBS T
stream.o ExpandKeyNBS T

Number of similar (implementation,compiler) pairs: 6, namely:
ImplementationCompiler
T:sse4clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
T:sse4clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
T:sse4clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
T:sse4gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
T:sse4gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
T:sse4gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)