Implementation notes: amd64, comet, crypto_hashblocks/sha256

Computer: comet
Microarchitecture: amd64; Comet Lake (806ec)
Architecture: amd64
CPU ID: GenuineIntel-000806ec-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_hashblocks
Primitive: sha256
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
1821211449 0 023868 780 960inplacegcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010520231222
1825111449 0 021980 780 960inplacegcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010520231222
1829911417 0 021916 780 960refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010520231222
1832211417 0 023804 780 960refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010520231222
1983011158 0 021259 772 960refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010520231222
2007711199 0 021339 772 960inplacegcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010520231222
2028511636 0 025649 852 928inplaceclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010520231222
2029611636 0 022775 844 960inplaceclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010520231222
2038511636 0 025945 852 960inplaceclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010520231222
2038911636 0 021961 852 896inplaceclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010520231222
2056211578 0 022727 844 960refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010520231222
2067811587 0 025897 852 960refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010520231222
2068011587 0 025601 852 928refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010520231222
2069011587 0 021913 852 896refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010520231222
2284711497 0 020583 756 928refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010520231222
2294811329 0 020423 756 928inplacegcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010520231222
2661911619 0 024313 852 896refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010520231222
2700411721 0 024425 852 896inplaceclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010520231222

Compiler output

Implementation: dolbeau/amd64-sha
Security model: constbranchindex
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
blocks.c: blocks.c:176:3: error: always_inline function '_mm_sha256rnds2_epu32' requires target feature 'sha', but would be inlined into function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex' that is compiled without support for 'sha'
blocks.c: DO16ROUNDS(i0, i1, i2, i3, c0, c1, c2, c3);
blocks.c: ^
blocks.c: blocks.c:129:8: note: expanded from macro 'DO16ROUNDS'
blocks.c: x1 = _mm_sha256rnds2_epu32(s1, s0, h0); \
blocks.c: ^
blocks.c: blocks.c:176:3: error: always_inline function '_mm_sha256rnds2_epu32' requires target feature 'sha', but would be inlined into function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex' that is compiled without support for 'sha'
blocks.c: blocks.c:131:8: note: expanded from macro 'DO16ROUNDS'
blocks.c: x0 = _mm_sha256rnds2_epu32(s0, x1, h0); \
blocks.c: ^
blocks.c: blocks.c:176:3: error: always_inline function '_mm_sha256rnds2_epu32' requires target feature 'sha', but would be inlined into function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex' that is compiled without support for 'sha'
blocks.c: blocks.c:134:8: note: expanded from macro 'DO16ROUNDS'
blocks.c: s1 = _mm_sha256rnds2_epu32(x1, x0, h1); \
blocks.c: ^
blocks.c: blocks.c:176:3: error: always_inline function '_mm_sha256rnds2_epu32' requires target feature 'sha', but would be inlined into function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex' that is compiled without support for 'sha'
blocks.c: blocks.c:136:8: note: expanded from macro 'DO16ROUNDS'
blocks.c: s0 = _mm_sha256rnds2_epu32(x0, s1, h1); \
blocks.c: ^
blocks.c: blocks.c:176:3: error: always_inline function '_mm_sha256rnds2_epu32' requires target feature 'sha', but would be inlined into function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex' that is compiled without support for 'sha'
blocks.c: blocks.c:139:8: note: expanded from macro 'DO16ROUNDS'
blocks.c: x1 = _mm_sha256rnds2_epu32(s1, s0, h0); \
blocks.c: ^
blocks.c: blocks.c:176:3: error: always_inline function '_mm_sha256rnds2_epu32' requires target feature 'sha', but would be inlined into function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex' that is compiled without support for 'sha'
blocks.c: blocks.c:141:8: note: expanded from macro 'DO16ROUNDS'
blocks.c: x0 = _mm_sha256rnds2_epu32(s0, x1, h0); \
blocks.c: ...

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

Compiler output

Implementation: dolbeau/amd64-sha
Security model: constbranchindex
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
blocks.c: blocks.c:85:7: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex' that is compiled without support for 'ssse3'
blocks.c: d0 = _mm_shuffle_epi8(d0, vperm);
blocks.c: ^
blocks.c: blocks.c:86:7: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex' that is compiled without support for 'ssse3'
blocks.c: d1 = _mm_shuffle_epi8(d1, vperm);
blocks.c: ^
blocks.c: blocks.c:97:7: error: '__builtin_ia32_palignr128' needs target feature ssse3
blocks.c: d0 = _mm_alignr_epi8(d0, d1, 0x08);
blocks.c: ^
blocks.c: /usr/lib/llvm-14/lib/clang/14.0.6/include/tmmintrin.h:152:13: note: expanded from macro '_mm_alignr_epi8'
blocks.c: ((__m128i)__builtin_ia32_palignr128((__v16qi)(__m128i)(a), \
blocks.c: ^
blocks.c: blocks.c:98:7: error: '__builtin_ia32_pblendw128' needs target feature sse4.1
blocks.c: d1 = _mm_blend_epi16(d1, s0, 0xf0);
blocks.c: ^
blocks.c: /usr/lib/llvm-14/lib/clang/14.0.6/include/smmintrin.h:520:14: note: expanded from macro '_mm_blend_epi16'
blocks.c: ((__m128i) __builtin_ia32_pblendw128 ((__v8hi)(__m128i)(V1), \
blocks.c: ^
blocks.c: blocks.c:113:8: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex' that is compiled without support for 'ssse3'
blocks.c: i0 = _mm_shuffle_epi8(i0, vperm);
blocks.c: ^
blocks.c: blocks.c:114:8: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex' that is compiled without support for 'ssse3'
blocks.c: i1 = _mm_shuffle_epi8(i1, vperm);
blocks.c: ^
blocks.c: blocks.c:115:8: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex' that is compiled without support for 'ssse3'
blocks.c: ...

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

Compiler output

Implementation: dolbeau/amd64-sha
Security model: constbranchindex
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
blocks.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/12/include/immintrin.h:103,
blocks.c: from blocks.c:37:
blocks.c: /usr/lib/gcc/x86_64-linux-gnu/12/include/shaintrin.h: In function 'crypto_hashblocks_sha256_dolbeau_amd64_sha_constbranchindex':
blocks.c: /usr/lib/gcc/x86_64-linux-gnu/12/include/shaintrin.h:87:1: error: inlining failed in call to 'always_inline' '_mm_sha256rnds2_epu32': target specific option mismatch
blocks.c: 87 | _mm_sha256rnds2_epu32 (__m128i __A, __m128i __B, __m128i __C)
blocks.c: | ^~~~~~~~~~~~~~~~~~~~~
blocks.c: blocks.c:146:22: note: called from here
blocks.c: 146 | s0 = _mm_sha256rnds2_epu32(x0, s1, h1)
blocks.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blocks.c: blocks.c:188:17: note: in expansion of macro 'DO16ROUNDS'
blocks.c: 188 | DO16ROUNDS(j0, j1, j2, j3, cc, cd, ce, cf);
blocks.c: | ^~~~~~~~~~
blocks.c: /usr/lib/gcc/x86_64-linux-gnu/12/include/shaintrin.h:87:1: error: inlining failed in call to 'always_inline' '_mm_sha256rnds2_epu32': target specific option mismatch
blocks.c: 87 | _mm_sha256rnds2_epu32 (__m128i __A, __m128i __B, __m128i __C)
blocks.c: | ^~~~~~~~~~~~~~~~~~~~~
blocks.c: blocks.c:144:22: note: called from here
blocks.c: 144 | s1 = _mm_sha256rnds2_epu32(x1, x0, h1); \
blocks.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blocks.c: blocks.c:188:17: note: in expansion of macro 'DO16ROUNDS'
blocks.c: 188 | DO16ROUNDS(j0, j1, j2, j3, cc, cd, ce, cf);
blocks.c: | ^~~~~~~~~~
blocks.c: /usr/lib/gcc/x86_64-linux-gnu/12/include/shaintrin.h:87:1: error: inlining failed in call to 'always_inline' '_mm_sha256rnds2_epu32': target specific option mismatch
blocks.c: 87 | _mm_sha256rnds2_epu32 (__m128i __A, __m128i __B, __m128i __C)
blocks.c: | ^~~~~~~~~~~~~~~~~~~~~
blocks.c: blocks.c:141:22: note: called from here
blocks.c: ...

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE dolbeau/amd64-sha
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE dolbeau/amd64-sha
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE dolbeau/amd64-sha
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE dolbeau/amd64-sha