Implementation notes: amd64, comet, crypto_dh/k298

Computer: comet
Microarchitecture: amd64; Comet Lake (806ec)
Architecture: amd64
CPU ID: GenuineIntel-000806ec-bfebfbff
SUPERCOP version: 20240625
Operation: crypto_dh
Primitive: k298
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
202703146707 0 0166281 860 1728T:refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
22943424963 92160 047124 92956 1792T:refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
22983923482 92160 041852 92948 1760T:refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
23026823323 92160 043580 92956 1792T:refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
251536171483 0 0188241 860 1760T:refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
251741171483 0 0188553 860 1792T:refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
262423116508 0 0136583 852 1792T:refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625

Checksum failure


f915491b2bfd72afef772d66e5d93bd26fcf7cf7bf7513d13ee8419b0f467064

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

Compiler output


dh.c: In file included from dh.c:8:
dh.c: ./smu.h:24:52: warning: unused variable 't2' [-Wunused-variable]
dh.c:     uint64_t r00, r01, r10, r11, t_w = 12, t0, t1, t2, hi, lo;
dh.c:                                                    ^
dh.c: ./smu.h:24:34: warning: unused variable 't_w' [-Wunused-variable]
dh.c:     uint64_t r00, r01, r10, r11, t_w = 12, t0, t1, t2, hi, lo;
dh.c:                                  ^
dh.c: ./smu.h:124:31: warning: unused variable 'cmp_sse' [-Wunused-variable]
dh.c:     __m128i dig_sse, sig_sse, cmp_sse, msk_sse;
dh.c:                               ^
dh.c: 3 warnings generated.

Number of similar (implementation,compiler) pairs: 3, namely:
ImplementationCompiler
T:refclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_14.0.6)
T:refclang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_14.0.6)
T:refclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_14.0.6)

Compiler output


dh.c: In file included from dh.c:8:
dh.c: ./smu.h:24:34: warning: unused variable 't_w' [-Wunused-variable]
dh.c:     uint64_t r00, r01, r10, r11, t_w = 12, t0, t1, t2, hi, lo;
dh.c:                                  ^
dh.c: ./smu.h:24:52: warning: unused variable 't2' [-Wunused-variable]
dh.c:     uint64_t r00, r01, r10, r11, t_w = 12, t0, t1, t2, hi, lo;
dh.c:                                                    ^
dh.c: ./smu.h:124:31: warning: unused variable 'cmp_sse' [-Wunused-variable]
dh.c:     __m128i dig_sse, sig_sse, cmp_sse, msk_sse;
dh.c:                               ^
dh.c: 3 warnings generated.

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:refclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_14.0.6)

Compiler output


dh.c: In file included from dh.c:6:
dh.c: ./ffa.h:47:5: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c:     ffa_red_149_stp(a_00, a_01, tp_0, tp_1, tp_2, p_149_0, p_149_1);
dh.c:     ^
dh.c: ./ffa.h:18:12: note: expanded from macro 'ffa_red_149_stp'
dh.c:     tp_2 = _mm_clmulepi64_si128(p_149_0, tp_0, 0x00);\
dh.c:            ^
dh.c: /usr/lib/llvm-14/lib/clang/14.0.6/include/__wmmintrin_pclmul.h:45:13: note: expanded from macro '_mm_clmulepi64_si128'
dh.c:   ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \
dh.c:             ^
dh.c: In file included from dh.c:6:
dh.c: ./ffa.h:47:5: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c: ./ffa.h:19:12: note: expanded from macro 'ffa_red_149_stp'
dh.c:     tp_1 = _mm_clmulepi64_si128(p_149_0, tp_0, 0x01);\
dh.c:            ^
dh.c: /usr/lib/llvm-14/lib/clang/14.0.6/include/__wmmintrin_pclmul.h:45:13: note: expanded from macro '_mm_clmulepi64_si128'
dh.c:   ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \
dh.c:             ^
dh.c: In file included from dh.c:6:
dh.c: ./ffa.h:47:5: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c: ./ffa.h:20:12: note: expanded from macro 'ffa_red_149_stp'
dh.c:     tp_0 = _mm_clmulepi64_si128(p_149_1, tp_0, 0x00);\
dh.c:            ^
dh.c: /usr/lib/llvm-14/lib/clang/14.0.6/include/__wmmintrin_pclmul.h:45:13: note: expanded from macro '_mm_clmulepi64_si128'
dh.c:   ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \
dh.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:refclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_14.0.6)

Compiler output


dh.c: In file included from dh.c:8:
dh.c: smu.h: In function 'smu_3nf':
dh.c: smu.h:24:52: warning: unused variable 't2' [-Wunused-variable]
dh.c:    24 |     uint64_t r00, r01, r10, r11, t_w = 12, t0, t1, t2, hi, lo;
dh.c:       |                                                    ^~
dh.c: smu.h:24:34: warning: unused variable 't_w' [-Wunused-variable]
dh.c:    24 |     uint64_t r00, r01, r10, r11, t_w = 12, t0, t1, t2, hi, lo;
dh.c:       |                                  ^~~
dh.c: smu.h: In function 'smu_3nf_ltr':
dh.c: smu.h:124:31: warning: unused variable 'cmp_sse' [-Wunused-variable]
dh.c:   124 |     __m128i dig_sse, sig_sse, cmp_sse, msk_sse;
dh.c:       |                               ^~~~~~~
dh.c: smu.h:138:7: warning: array subscript 0 is outside array bounds of 'uint64_t[0]' {aka 'long unsigned int[]'} [-Warray-bounds]
dh.c:   138 |     k1[0] = k_01[0]; k1[1] = k_01[1];
dh.c:       |     ~~^~~
dh.c: smu.h:132:21: note: while referencing 'k1'
dh.c:   132 |     uint64_t k0[2], k1[0];
dh.c:       |                     ^~
dh.c: smu.h:138:24: warning: array subscript 1 is outside array bounds of 'uint64_t[0]' {aka 'long unsigned int[]'} [-Warray-bounds]
dh.c:   138 |     k1[0] = k_01[0]; k1[1] = k_01[1];
dh.c:       |                      ~~^~~
dh.c: smu.h:132:21: note: while referencing 'k1'
dh.c:   132 |     uint64_t k0[2], k1[0];
dh.c:       |                     ^~
dh.c: smu.h:147:19: warning: array subscript 0 is outside array bounds of 'uint64_t[0]' {aka 'long unsigned int[]'} [-Warray-bounds]
dh.c: ...

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

Compiler output


dh.c: In file included from dh.c:8:
dh.c: smu.h: In function 'smu_3nf':
dh.c: smu.h:24:52: warning: unused variable 't2' [-Wunused-variable]
dh.c:    24 |     uint64_t r00, r01, r10, r11, t_w = 12, t0, t1, t2, hi, lo;
dh.c:       |                                                    ^~
dh.c: smu.h:24:34: warning: unused variable 't_w' [-Wunused-variable]
dh.c:    24 |     uint64_t r00, r01, r10, r11, t_w = 12, t0, t1, t2, hi, lo;
dh.c:       |                                  ^~~
dh.c: smu.h: In function 'smu_3nf_ltr':
dh.c: smu.h:124:31: warning: unused variable 'cmp_sse' [-Wunused-variable]
dh.c:   124 |     __m128i dig_sse, sig_sse, cmp_sse, msk_sse;
dh.c:       |                               ^~~~~~~

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