Implementation notes: amd64, devoptimis, crypto_hash/blake2b

Computer: devoptimis
Architecture: amd64
CPU ID: GenuineIntel-000206c2-bfebfbff
SUPERCOP version: 20190910
Operation: crypto_hash
Primitive: blake2b
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
690515291 0 025485 768 808xmmgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910
693212134 0 022380 776 808regsgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910
728312129 0 024637 784 808regsgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910
732915374 0 025469 768 808xmmgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910
1163011473 0 020744 760 776regsgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910
1167712128 0 022284 776 808regsgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910
1218215291 0 027726 776 808xmmgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910
1298413219 0 022425 752 776xmmgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910
150127914 0 018301 784 808refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910
151059282 0 021853 784 808refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910
168568165 0 018453 784 808refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910
194587358 0 016696 760 776refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019100320190910

Test failure

Implementation: avxicc
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
error 111

Number of similar (compiler,implementation) pairs: 12, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE avxicc
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE avxicc
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE avxicc
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE avxicc
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE moon/avx/64
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE moon/avx/64
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE moon/avx/64
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE moon/avx/64
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE moon/xop/64
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE moon/xop/64
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE moon/xop/64
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE moon/xop/64

Compiler output

Implementation: avx2-1
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
blake2b.c: blake2b.c: In function 'crypto_hash_blake2b_avx2_1':
blake2b.c: blake2b.c:37:17: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
blake2b.c: const __m256i r16 = _mm256_setr_epi8( 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9,
blake2b.c: ^~~
blake2b.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
blake2b.c: from blake2b.c:11:
blake2b.c: /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '_mm256_set_epi64x': target specific option mismatch
blake2b.c: _mm256_set_epi64x (long long __A, long long __B, long long __C,
blake2b.c: ^~~~~~~~~~~~~~~~~
blake2b.c: blake2b.c:57:8: note: called from here
blake2b.c: ymm1 = _mm256_set_epi64x(0x5BE0CD19137E2179ULL, 0x1F83D9ABFB41BD6BULL, 0x9B05688C2B3E6C1FULL, 0x510E527FADE682D1ULL);
blake2b.c: ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2b.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
blake2b.c: from blake2b.c:11:
blake2b.c: /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '_mm256_set_epi64x': target specific option mismatch
blake2b.c: _mm256_set_epi64x (long long __A, long long __B, long long __C,
blake2b.c: ^~~~~~~~~~~~~~~~~
blake2b.c: blake2b.c:56:8: note: called from here
blake2b.c: ymm0 = _mm256_set_epi64x(0xA54FF53A5F1D36F1ULL, 0x3C6EF372FE94F82BULL, 0xBB67AE8584CAA73BULL, 0x6A09E667F3BCC908ULL ^ 0x0000000001010040ULL);
blake2b.c: ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2b.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
blake2b.c: from blake2b.c:11:
blake2b.c: /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:1382:1: error: inlining failed in call to always_inline '_mm256_setr_epi8': target specific option mismatch
blake2b.c: _mm256_setr_epi8 (char __q31, char __q30, char __q29, char __q28,
blake2b.c: ^~~~~~~~~~~~~~~~
blake2b.c: ...

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

Compiler output

Implementation: avx2-2
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
blake2b.c: blake2b.c: In function 'crypto_hash_blake2b_avx2_2':
blake2b.c: blake2b.c:38:17: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
blake2b.c: const __m256i r16 = _mm256_setr_epi8( 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9,
blake2b.c: ^~~
blake2b.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
blake2b.c: from blake2b.c:12:
blake2b.c: /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '_mm256_set_epi64x': target specific option mismatch
blake2b.c: _mm256_set_epi64x (long long __A, long long __B, long long __C,
blake2b.c: ^~~~~~~~~~~~~~~~~
blake2b.c: blake2b.c:58:8: note: called from here
blake2b.c: ymm1 = _mm256_set_epi64x(0x5BE0CD19137E2179ULL, 0x1F83D9ABFB41BD6BULL, 0x9B05688C2B3E6C1FULL, 0x510E527FADE682D1ULL);
blake2b.c: ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2b.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
blake2b.c: from blake2b.c:12:
blake2b.c: /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '_mm256_set_epi64x': target specific option mismatch
blake2b.c: _mm256_set_epi64x (long long __A, long long __B, long long __C,
blake2b.c: ^~~~~~~~~~~~~~~~~
blake2b.c: blake2b.c:57:8: note: called from here
blake2b.c: ymm0 = _mm256_set_epi64x(0xA54FF53A5F1D36F1ULL, 0x3C6EF372FE94F82BULL, 0xBB67AE8584CAA73BULL, 0x6A09E667F3BCC908ULL ^ 0x0000000001010040ULL);
blake2b.c: ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2b.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
blake2b.c: from blake2b.c:12:
blake2b.c: /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:1382:1: error: inlining failed in call to always_inline '_mm256_setr_epi8': target specific option mismatch
blake2b.c: _mm256_setr_epi8 (char __q31, char __q30, char __q29, char __q28,
blake2b.c: ^~~~~~~~~~~~~~~~
blake2b.c: ...

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

Compiler output

Implementation: avx2-3
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
blake2b.c: blake2b.c: In function 'crypto_hash_blake2b_avx2_3':
blake2b.c: blake2b.c:38:17: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
blake2b.c: const __m256i r16 = _mm256_setr_epi8( 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9,
blake2b.c: ^~~
blake2b.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
blake2b.c: from blake2b.c:12:
blake2b.c: /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '_mm256_set_epi64x': target specific option mismatch
blake2b.c: _mm256_set_epi64x (long long __A, long long __B, long long __C,
blake2b.c: ^~~~~~~~~~~~~~~~~
blake2b.c: blake2b.c:58:8: note: called from here
blake2b.c: ymm1 = _mm256_set_epi64x(0x5BE0CD19137E2179ULL, 0x1F83D9ABFB41BD6BULL, 0x9B05688C2B3E6C1FULL, 0x510E527FADE682D1ULL);
blake2b.c: ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2b.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
blake2b.c: from blake2b.c:12:
blake2b.c: /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '_mm256_set_epi64x': target specific option mismatch
blake2b.c: _mm256_set_epi64x (long long __A, long long __B, long long __C,
blake2b.c: ^~~~~~~~~~~~~~~~~
blake2b.c: blake2b.c:57:8: note: called from here
blake2b.c: ymm0 = _mm256_set_epi64x(0xA54FF53A5F1D36F1ULL, 0x3C6EF372FE94F82BULL, 0xBB67AE8584CAA73BULL, 0x6A09E667F3BCC908ULL ^ 0x0000000001010040ULL);
blake2b.c: ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2b.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
blake2b.c: from blake2b.c:12:
blake2b.c: /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:1382:1: error: inlining failed in call to always_inline '_mm256_setr_epi8': target specific option mismatch
blake2b.c: _mm256_setr_epi8 (char __q31, char __q30, char __q29, char __q28,
blake2b.c: ^~~~~~~~~~~~~~~~
blake2b.c: ...

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

Compiler output

Implementation: moon/avx2/64
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: crypto_hash_blake2b.a(blake2b.o): relocation R_X86_64_32 against `.text' can not be used when making a PIE object; recompile with -fPIC
try.c: /usr/bin/ld: final link failed: Nonrepresentable section on output
try.c: collect2: error: ld returned 1 exit status

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

Compiler output

Implementation: ymm
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
blake2b.c: blake2b.c:15:2: error: #error "This code requires at least AVX."
blake2b.c: #error "This code requires at least AVX."
blake2b.c: ^~~~~
blake2b.c: blake2b.c: In function 'crypto_hash_blake2b_ymm':
blake2b.c: blake2b.c:203:10: error: incompatible types when assigning to type '__m128i {aka __vector(2) long long int}' from type '__m256i {aka __vector(4) long long int}'
blake2b.c: m0 = _mm256_loadu_si256((__m256i*)(in + 00));
blake2b.c: ^
blake2b.c: blake2b.c:204:10: error: incompatible types when assigning to type '__m128i {aka __vector(2) long long int}' from type '__m256i {aka __vector(4) long long int}'
blake2b.c: m1 = _mm256_loadu_si256((__m256i*)(in + 32));
blake2b.c: ^
blake2b.c: blake2b.c:205:10: error: incompatible types when assigning to type '__m128i {aka __vector(2) long long int}' from type '__m256i {aka __vector(4) long long int}'
blake2b.c: m2 = _mm256_loadu_si256((__m256i*)(in + 64));
blake2b.c: ^
blake2b.c: blake2b.c:206:10: error: incompatible types when assigning to type '__m128i {aka __vector(2) long long int}' from type '__m256i {aka __vector(4) long long int}'
blake2b.c: m3 = _mm256_loadu_si256((__m256i*)(in + 96));
blake2b.c: ^
blake2b.c: blake2b.c:225:10: error: incompatible types when assigning to type '__m128i {aka __vector(2) long long int}' from type '__m256i {aka __vector(4) long long int}'
blake2b.c: m0 = _mm256_loadu_si256((__m256i*)(buffer + 00));
blake2b.c: ^
blake2b.c: blake2b.c:226:10: error: incompatible types when assigning to type '__m128i {aka __vector(2) long long int}' from type '__m256i {aka __vector(4) long long int}'
blake2b.c: m1 = _mm256_loadu_si256((__m256i*)(buffer + 32));
blake2b.c: ^
blake2b.c: blake2b.c:227:10: error: incompatible types when assigning to type '__m128i {aka __vector(2) long long int}' from type '__m256i {aka __vector(4) long long int}'
blake2b.c: m2 = _mm256_loadu_si256((__m256i*)(buffer + 64));
blake2b.c: ^
blake2b.c: ...

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

Namespace violations

Implementation: ref
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
blake2b-ref.o blake2b T
blake2b-ref.o blake2b_final T
blake2b-ref.o blake2b_init T
blake2b-ref.o blake2b_init_key T
blake2b-ref.o blake2b_init_param T
blake2b-ref.o blake2b_update T

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