Implementation notes: amd64, icelake2, crypto_stream/speck128128ctr

Computer: icelake2
Architecture: amd64
CPU ID: GenuineIntel-000706e5-bfebfbff
SUPERCOP version: 20221005
Operation: crypto_stream
Primitive: speck128128ctr
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
112832840 0 044057 740 992T:avx512gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506
113235294 0 048186 764 1024T:avx512gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506
114636611 0 051378 764 1024T:avx512gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506
116635081 0 047473 756 1024T:avx512gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506
141036113 0 048394 772 960T:avx512clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
141736377 0 051858 772 992T:avx512clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
141736441 0 051994 772 1024T:avx512clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
143135974 0 049100 764 1024T:avx512clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
173638563 0 053330 764 1024T:avx2gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506
182037248 0 050138 764 1024T:avx2gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506
186635996 0 047209 740 992T:avx2gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506
186737162 0 049553 756 1024T:avx2gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506
246330416 0 042506 772 960T:avx2clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
247130944 0 046274 772 1024T:avx2clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
247630944 0 046202 772 992T:avx2clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
249030554 0 043428 764 1024T:avx2clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
317022993 0 036036 764 1024T:sse4clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
317223214 0 035394 772 960T:sse4clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
317923383 0 038866 772 1024T:sse4clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
318723383 0 038794 772 992T:sse4clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2022100320220506
346329437 0 041833 756 1024T:sse4gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506
541517140 0 031914 764 1024T:sse4gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506
543415975 0 028874 764 1024T:sse4gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506
544514905 0 026121 740 992T:sse4gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2022100320220506

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
stream.c: stream.c:288:3: error: always_inline function '_mm256_set_epi64x' requires target feature 'avx', but would be inlined into function 'ExpandKey' that is compiled without support for 'avx'
stream.c: EK(A,B,rk,key);
stream.c: ^
stream.c: ./Speck128128AVX2.h:54:24: note: expanded from macro 'EK'
stream.c: #define EK(A,B,k,key) (RK(B,A,k,key,0), RK(B,A,k,key,1), RK(B,A,k,key,2), RK(B,A,k,key,3), RK(B,A,k,key,4), RK(B,A,k,key,5), RK(B,A,k,key,6), \
stream.c: ^
stream.c: ./Speck128128AVX2.h:52:28: note: expanded from macro 'RK'
stream.c: #define RK(X,Y,k,key,i) (SET1(k[i],Y), key[i]=Y, X=RCS(X,8), X+=Y, X^=i, Y=LCS(Y,3), Y^=X)
stream.c: ^
stream.c: ./Intrinsics_AVX2_128block.h:25:22: note: expanded from macro 'SET1'
stream.c: #define SET1(X,c) (X=SET(c,c,c,c))
stream.c: ^
stream.c: ./Intrinsics_AVX2_128block.h:24:13: note: expanded from macro 'SET'
stream.c: #define SET _mm256_set_epi64x
stream.c: ^
stream.c: stream.c:288:3: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
stream.c: ./Speck128128AVX2.h:54:24: note: expanded from macro 'EK'
stream.c: #define EK(A,B,k,key) (RK(B,A,k,key,0), RK(B,A,k,key,1), RK(B,A,k,key,2), RK(B,A,k,key,3), RK(B,A,k,key,4), RK(B,A,k,key,5), RK(B,A,k,key,6), \
stream.c: ^
stream.c: ./Speck128128AVX2.h:52:28: note: expanded from macro 'RK'
stream.c: #define RK(X,Y,k,key,i) (SET1(k[i],Y), key[i]=Y, X=RCS(X,8), X+=Y, X^=i, Y=LCS(Y,3), Y^=X)
stream.c: ^
stream.c: ./Intrinsics_AVX2_128block.h:25:22: note: expanded from macro 'SET1'
stream.c: #define SET1(X,c) (X=SET(c,c,c,c))
stream.c: ^
stream.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:avx2

Compiler output

Implementation: T:avx512
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
stream.c: stream.c:329:3: error: always_inline function '_mm512_set_epi64' requires target feature 'avx512f', but would be inlined into function 'ExpandKey' that is compiled without support for 'avx512f'
stream.c: EK(A,B,rk,key);
stream.c: ^
stream.c: ./Speck128128AVX512.h:59:24: note: expanded from macro 'EK'
stream.c: #define EK(A,B,k,key) (RK(B,A,k,key,0), RK(B,A,k,key,1), RK(B,A,k,key,2), RK(B,A,k,key,3), RK(B,A,k,key,4), RK(B,A,k,key,5), RK(B,A,k,key,6), \
stream.c: ^
stream.c: ./Speck128128AVX512.h:57:26: note: expanded from macro 'RK'
stream.c: #define RK(X,Y,k,key,i) (SET1(k[i],Y), key[i]=Y, X=RCS(X,8), X+=Y, X^=i, Y=LCS(Y,3), Y^=X)
stream.c: ^
stream.c: ./Intrinsics_AVX512_128block.h:25:22: note: expanded from macro 'SET1'
stream.c: #define SET1(X,c) (X=SET(c,c,c,c,c,c,c,c))
stream.c: ^
stream.c: ./Intrinsics_AVX512_128block.h:16:13: note: expanded from macro 'SET'
stream.c: #define SET _mm512_set_epi64
stream.c: ^
stream.c: stream.c:329:3: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'avx512f' enabled changes the ABI
stream.c: ./Speck128128AVX512.h:59:24: note: expanded from macro 'EK'
stream.c: #define EK(A,B,k,key) (RK(B,A,k,key,0), RK(B,A,k,key,1), RK(B,A,k,key,2), RK(B,A,k,key,3), RK(B,A,k,key,4), RK(B,A,k,key,5), RK(B,A,k,key,6), \
stream.c: ^
stream.c: ./Speck128128AVX512.h:57:26: note: expanded from macro 'RK'
stream.c: #define RK(X,Y,k,key,i) (SET1(k[i],Y), key[i]=Y, X=RCS(X,8), X+=Y, X^=i, Y=LCS(Y,3), Y^=X)
stream.c: ^
stream.c: ./Intrinsics_AVX512_128block.h:25:22: note: expanded from macro 'SET1'
stream.c: #define SET1(X,c) (X=SET(c,c,c,c,c,c,c,c))
stream.c: ^
stream.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:avx512

Compiler output

Implementation: T:sse4
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
stream.c: stream.c:114:21: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'Encrypt' that is compiled without support for 'ssse3'
stream.c: if (numbytes==32) Enc(X,Y,rk,2);
stream.c: ^
stream.c: ./Speck128128SSE4.h:42:23: note: expanded from macro 'Enc'
stream.c: #define Enc(X,Y,k,n) (Rx##n(X,Y,k[0]), Rx##n(X,Y,k[1]), Rx##n(X,Y,k[2]), Rx##n(X,Y,k[3]), Rx##n(X,Y,k[4]), Rx##n(X,Y,k[5]), Rx##n(X,Y,k[6]), Rx##n(X,Y,k[7]), \
stream.c: ^
stream.c: <scratch space>:105:1: note: expanded from here
stream.c: Rx2
stream.c: ^
stream.c: ./Speck128128SSE4.h:25:21: note: expanded from macro 'Rx2'
stream.c: #define Rx2(X,Y,k) (R(X[0],Y[0],k))
stream.c: ^
stream.c: ./Speck128128SSE4.h:23:29: note: expanded from macro 'R'
stream.c: #define R(X,Y,k) (X=XOR(ADD(ROR8(X),Y),k), Y=XOR(ROL(Y,3),X))
stream.c: ^
stream.c: ./Intrinsics_SSE4_128block.h:41:19: note: expanded from macro 'ROR8'
stream.c: #define ROR8(X) (SHFL(X,R8))
stream.c: ^
stream.c: ./Intrinsics_SSE4_128block.h:37:14: note: expanded from macro 'SHFL'
stream.c: #define SHFL _mm_shuffle_epi8
stream.c: ^
stream.c: stream.c:114:21: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'Encrypt' that is compiled without support for 'ssse3'
stream.c: ./Speck128128SSE4.h:42:41: note: expanded from macro 'Enc'
stream.c: #define Enc(X,Y,k,n) (Rx##n(X,Y,k[0]), Rx##n(X,Y,k[1]), Rx##n(X,Y,k[2]), Rx##n(X,Y,k[3]), Rx##n(X,Y,k[4]), Rx##n(X,Y,k[5]), Rx##n(X,Y,k[6]), Rx##n(X,Y,k[7]), \
stream.c: ^
stream.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:sse4