Implementation notes: amd64, hydra5, crypto_scalarmult/kummer

Computer: hydra5
Microarchitecture: amd64; K10 32nm (300f10)
Architecture: amd64
CPU ID: AuthenticAMD-00300f10-178bfbff
SUPERCOP version: 20240625
Operation: crypto_scalarmult
Primitive: kummer
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
16585386834 0 028693 812 1792ref5ugcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
171404713943 0 035184 868 1728ref5clang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
171586913943 0 035184 868 1728ref5clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
171658614185 0 035400 868 1728ref5uclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
171661914185 0 035400 868 1728ref5uclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
17436146591 0 028421 812 1792ref5gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
17662664999 0 025557 812 1792ref5ugcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
17681974334 0 022594 860 1728ref5clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
176932812077 0 032464 868 1728ref5clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
177488812471 0 032808 868 1728ref5uclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
178102512245 0 031144 868 1728ref5clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
17937254675 0 025165 812 1792ref5gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
18159564629 0 022898 860 1728ref5uclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
182882312479 0 031376 868 1728ref5uclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
19276604747 0 022997 804 1760ref5ugcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
19295064446 0 022709 804 1760ref5gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
20107794768 0 024333 812 1792ref5gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
20405615078 0 024661 812 1792ref5ugcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625

Test failure


error 111

Number of similar (implementation,compiler) pairs: 18, namely:
ImplementationCompiler
avxclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avxclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avxclang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avxclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avxclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avxgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avxgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avxgcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avxgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avx2clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avx2clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avx2clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avx2clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avx2clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avx2gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avx2gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avx2gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avx2gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)

Compiler output


gfe.c: gfe.c:59:30: warning: argument 1 of type 'unsigned char *' declared as a pointer [-Warray-parameter=]
gfe.c:    59 | void gfe_pack(unsigned char *r, const gfe *x)
gfe.c:       |               ~~~~~~~~~~~~~~~^
gfe.c: In file included from gfe.c:1:
gfe.c: gfe.h:49:15: note: previously declared as an array 'unsigned char[16]'
gfe.c:    49 | void gfe_pack(unsigned char[16], const gfe *x);
gfe.c:       |               ^~~~~~~~~~~~~~~~~
gfe.c: gfe.c: In function 'fromdouble':
gfe.c: gfe.c:71:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
gfe.c:    71 |   return *(unsigned long long *) &d - 0x4338000000000000;
gfe.c:       |           ^~~~~~~~~~~~~~~~~~~~~~~~~
gfe.c: gfe.c: In function 'todouble':
gfe.c: gfe.c:77:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
gfe.c:    77 |   return *(double *) &l - 6755399441055744.0;
gfe.c:       |           ^~~~~~~~~~~~~
gfe.c: gfe.c: At top level:
gfe.c: gfe.c:80:28: warning: argument 1 of type 'gfe *' declared as a pointer [-Warray-parameter=]
gfe.c:    80 | void gfe4x3limb_split(gfe *r, const gfe4x *x)
gfe.c:       |                       ~~~~~^
gfe.c: In file included from gfe.c:1:
gfe.c: gfe.h:53:27: note: previously declared as an array 'gfe[4]'
gfe.c:    53 | void gfe4x3limb_split(gfe r[4], const gfe4x *a);
gfe.c:       |                       ~~~~^~~~

Number of similar (implementation,compiler) pairs: 6, namely:
ImplementationCompiler
avxgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avxgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avxgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avx2gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avx2gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avx2gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)

Compiler output


gfe.c: gfe.c:59:30: warning: argument 1 of type 'unsigned char *' declared as a pointer [-Warray-parameter=]
gfe.c:    59 | void gfe_pack(unsigned char *r, const gfe *x)
gfe.c:       |               ~~~~~~~~~~~~~~~^
gfe.c: In file included from gfe.c:1:
gfe.c: gfe.h:49:15: note: previously declared as an array 'unsigned char[16]'
gfe.c:    49 | void gfe_pack(unsigned char[16], const gfe *x);
gfe.c:       |               ^~~~~~~~~~~~~~~~~
gfe.c: gfe.c:80:28: warning: argument 1 of type 'gfe *' declared as a pointer [-Warray-parameter=]
gfe.c:    80 | void gfe4x3limb_split(gfe *r, const gfe4x *x)
gfe.c:       |                       ~~~~~^
gfe.c: In file included from gfe.c:1:
gfe.c: gfe.h:53:27: note: previously declared as an array 'gfe[4]'
gfe.c:    53 | void gfe4x3limb_split(gfe r[4], const gfe4x *a);
gfe.c:       |                       ~~~~^~~~

Number of similar (implementation,compiler) pairs: 2, namely:
ImplementationCompiler
avxgcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avx2gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)

Compiler output


smult.c: smult.c:36:8: error: always_inline function '_mm256_mul_epi32' requires target feature 'avx2', but would be inlined into function 'crypto_scalarmult_kummer_avx2int_constbranchindex_gfe4x_mulconst' that is compiled without support for 'avx2'
smult.c:   t0 = _mm256_mul_epi32(a->v[0],*b);
smult.c:        ^
smult.c: smult.c:36:8: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
smult.c: smult.c:37:8: error: always_inline function '_mm256_mul_epi32' requires target feature 'avx2', but would be inlined into function 'crypto_scalarmult_kummer_avx2int_constbranchindex_gfe4x_mulconst' that is compiled without support for 'avx2'
smult.c:   t1 = _mm256_mul_epi32(a->v[1],*b);
smult.c:        ^
smult.c: smult.c:37:8: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
smult.c: smult.c:38:30: error: always_inline function '_mm256_srli_epi64' requires target feature 'avx2', but would be inlined into function 'crypto_scalarmult_kummer_avx2int_constbranchindex_gfe4x_mulconst' that is compiled without support for 'avx2'
smult.c:     t1 = _mm256_add_epi64(t1,_mm256_srli_epi64(t0,26)); t0 &= mask26;
smult.c:                              ^
smult.c: smult.c:38:30: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
smult.c: smult.c:38:10: error: always_inline function '_mm256_add_epi64' requires target feature 'avx2', but would be inlined into function 'crypto_scalarmult_kummer_avx2int_constbranchindex_gfe4x_mulconst' that is compiled without support for 'avx2'
smult.c:     t1 = _mm256_add_epi64(t1,_mm256_srli_epi64(t0,26)); t0 &= mask26;
smult.c:          ^
smult.c: smult.c:38:10: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
smult.c: smult.c:39:8: error: always_inline function '_mm256_mul_epi32' requires target feature 'avx2', but would be inlined into function 'crypto_scalarmult_kummer_avx2int_constbranchindex_gfe4x_mulconst' that is compiled without support for 'avx2'
smult.c:   t2 = _mm256_mul_epi32(a->v[2],*b);
smult.c:        ^
smult.c: smult.c:39:8: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
smult.c: smult.c:40:8: error: always_inline function '_mm256_mul_epi32' requires target feature 'avx2', but would be inlined into function 'crypto_scalarmult_kummer_avx2int_constbranchindex_gfe4x_mulconst' that is compiled without support for 'avx2'
smult.c:   t3 = _mm256_mul_epi32(a->v[3],*b);
smult.c:        ^
smult.c: smult.c:40:8: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
smult.c: smult.c:41:8: error: always_inline function '_mm256_mul_epi32' requires target feature 'avx2', but would be inlined into function 'crypto_scalarmult_kummer_avx2int_constbranchindex_gfe4x_mulconst' that is compiled without support for 'avx2'
smult.c: ...

Number of similar (implementation,compiler) pairs: 5, namely:
ImplementationCompiler
avx2intclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avx2intclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avx2intclang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avx2intclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
avx2intclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


smult.c: smult.c: In function 'crypto_scalarmult_kummer_avx2int_constbranchindex_gfe4x_from_gfe':
smult.c: smult.c:14:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
smult.c:    14 |     0[(crypto_uint64 *) &y->v[i]] = x[0].v[i];
smult.c:       |      ^
smult.c: smult.c: In function 'crypto_scalarmult_kummer_avx2int_constbranchindex_gfe4x_to_gfe':
smult.c: smult.c:26:18: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
smult.c:    26 |     x[0].v[i] = 0[(crypto_uint64 *) &y->v[i]];
smult.c:       |                  ^
smult.c: smult.c: In function 'crypto_scalarmult_kummer_avx2int_constbranchindex_gfe4x_mulconst':
smult.c: smult.c:36:6: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
smult.c:    36 |   t0 = _mm256_mul_epi32(a->v[0],*b);
smult.c:       |   ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
smult.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
smult.c:                  from gfe4x.h:5,
smult.c:                  from smult.c:3:
smult.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:126:1: error: inlining failed in call to 'always_inline' '_mm256_add_epi64': target specific option mismatch
smult.c:   126 | _mm256_add_epi64 (__m256i __A, __m256i __B)
smult.c:       | ^~~~~~~~~~~~~~~~
smult.c: smult.c:45:10: note: called from here
smult.c:    45 |     t2 = _mm256_add_epi64(t2,_mm256_srli_epi64(t1,25)); t1 &= mask25;
smult.c:       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
smult.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
smult.c:                  from gfe4x.h:5,
smult.c:                  from smult.c:3:
smult.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:787:1: error: inlining failed in call to 'always_inline' '_mm256_srli_epi64': target specific option mismatch
smult.c: ...

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

Compiler output


smult.c: smult.c: In function 'crypto_scalarmult_kummer_avx2int_constbranchindex_gfe4x_mulconst':
smult.c: smult.c:36:6: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
smult.c:    36 |   t0 = _mm256_mul_epi32(a->v[0],*b);
smult.c:       |   ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
smult.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
smult.c:                  from gfe4x.h:5,
smult.c:                  from smult.c:3:
smult.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:126:1: error: inlining failed in call to 'always_inline' '_mm256_add_epi64': target specific option mismatch
smult.c:   126 | _mm256_add_epi64 (__m256i __A, __m256i __B)
smult.c:       | ^~~~~~~~~~~~~~~~
smult.c: smult.c:45:10: note: called from here
smult.c:    45 |     t2 = _mm256_add_epi64(t2,_mm256_srli_epi64(t1,25)); t1 &= mask25;
smult.c:       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
smult.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
smult.c:                  from gfe4x.h:5,
smult.c:                  from smult.c:3:
smult.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:787:1: error: inlining failed in call to 'always_inline' '_mm256_srli_epi64': target specific option mismatch
smult.c:   787 | _mm256_srli_epi64 (__m256i __A, int __B)
smult.c:       | ^~~~~~~~~~~~~~~~~
smult.c: smult.c:45:10: note: called from here
smult.c:    45 |     t2 = _mm256_add_epi64(t2,_mm256_srli_epi64(t1,25)); t1 &= mask25;
smult.c:       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
smult.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
smult.c:                  from gfe4x.h:5,
smult.c:                  from smult.c:3:
smult.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
avx2intgcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)

Passed TIMECOP


TIMECOP iterations: 10

Number of similar (implementation,compiler) pairs: 18, namely:
ImplementationCompiler
ref5clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
ref5clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
ref5clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
ref5clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
ref5clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
ref5gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
ref5gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
ref5gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
ref5gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
ref5uclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
ref5uclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
ref5uclang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
ref5uclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
ref5uclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
ref5ugcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
ref5ugcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
ref5ugcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
ref5ugcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)