Implementation notes: amd64, comet, crypto_aead/pi16cipher128v2

Computer: comet
Microarchitecture: amd64; Comet Lake (806ec)
Architecture: amd64
CPU ID: GenuineIntel-000806ec-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: pi16cipher128v2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
13231018311 8 033068 788 1088T:goptvgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
14499317320 8 031555 780 1088T:goptvgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
16701726699 8 043332 788 1088T:goptvgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
2072817723 8 020815 764 1056T:goptvgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
2758486321 8 023169 860 1024T:ref3clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
2839046177 8 024569 860 1088T:ref3clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
3180337446 8 024281 860 1024T:ref2clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
3235407434 8 025825 860 1088T:ref2clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
3307796425 8 024513 860 1056T:ref3clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
3598287096 8 025193 860 1056T:ref2clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
3809418031 8 024628 788 1088T:ref3gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
3842336688 8 021404 788 1088T:ref3gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
3951844600 8 018835 780 1088T:ref3gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
4017325973 8 020257 860 1024T:ref3clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
4350744666 8 019751 852 1088T:ref3clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
5087174088 8 017087 764 1056T:ref3gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
12000736263 8 020561 860 1024T:ref2clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
14500905103 8 019347 780 1088T:ref2gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
14854674438 8 017447 764 1056T:ref2gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
16672775014 8 020119 852 1088T:ref2clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
18663746923 8 021676 788 1088T:ref2gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222

Test failure

Implementation: T:optimized_nonSSE
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
error 111
crypto_aead_encrypt returns more than crypto_aead_ABYTES extra bytes

Number of similar (compiler,implementation) pairs: 18, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:optimized_nonSSE
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:optimized_nonSSE
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:optimized_nonSSE
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:optimized_nonSSE
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:optimized_nonSSE
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:optimized_nonSSE
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:optimized_nonSSE
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:optimized_nonSSE
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:optimized_nonSSE
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref

Compiler output

Implementation: T:goptv
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
pi-cipher.c: pi-cipher.c:286:9: error: use of unknown builtin '__builtin_shuffle' [-Wimplicit-function-declaration]
pi-cipher.c: n_t += __builtin_shuffle(y, g_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:286:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: n_t += __builtin_shuffle(y, g_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:287:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: n_t += __builtin_shuffle(y, n_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:290:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: n_t ^= __builtin_shuffle(n_t, n_x_1) ^ __builtin_shuffle(n_t, n_x_2);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:305:9: error: use of unknown builtin '__builtin_shuffle' [-Wimplicit-function-declaration]
pi-cipher.c: m_t += __builtin_shuffle(x, g_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:305:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: m_t += __builtin_shuffle(x, g_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:306:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: m_t += __builtin_shuffle(x, m_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:309:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: m_t ^= __builtin_shuffle(m_t, m_x_1) ^ __builtin_shuffle(m_t, m_x_2);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:354:9: error: use of unknown builtin '__builtin_shuffle' [-Wimplicit-function-declaration]
pi-cipher.c: ...

Number of similar (compiler,implementation) pairs: 5, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:goptv
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:goptv
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:goptv
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:goptv
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:goptv

Compiler output

Implementation: T:goptv
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE
pi-cipher.c: pi-cipher.c: In function 'pi16_init':
pi-cipher.c: pi-cipher.c:842:5: warning: 'pi' accessing 32 bytes in a region of size 8 [-Wstringop-overflow=]
pi-cipher.c: 842 | pi(ctx->cis);
pi-cipher.c: | ^~~~~~~~~~~~
pi-cipher.c: pi-cipher.c:842:5: note: referencing argument 1 of type 'word_t[4][4]' {aka 'short unsigned int[4][4]'}
pi-cipher.c: pi-cipher.c:649:13: note: in a call to function 'pi'
pi-cipher.c: 649 | static void pi(
pi-cipher.c: | ^~

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:goptv

Compiler output

Implementation: T:ref2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
pi-cipher.c: pi-cipher.c: In function 'mu':
pi-cipher.c: pi-cipher.c:226:5: warning: 'phi' reading 8 bytes from a region of size 4 [-Wstringop-overread]
pi-cipher.c: 226 | phi(t, x, mu_const, mu_v_const, mu_rot_const);
pi-cipher.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pi-cipher.c: pi-cipher.c:226:5: note: referencing argument 4 of type 'const uint8_t[8]' {aka 'const unsigned char[8]'}
pi-cipher.c: pi-cipher.c:226:5: note: referencing argument 5 of type 'const uint8_t[4]' {aka 'const unsigned char[4]'}
pi-cipher.c: pi-cipher.c:175:13: note: in a call to function 'phi'
pi-cipher.c: 175 | static void phi(
pi-cipher.c: | ^~~
pi-cipher.c: pi-cipher.c: In function 'ny':
pi-cipher.c: pi-cipher.c:237:5: warning: 'phi' reading 8 bytes from a region of size 4 [-Wstringop-overread]
pi-cipher.c: 237 | phi(dest, x, ny_const, ny_v_const, ny_rot_const);
pi-cipher.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pi-cipher.c: pi-cipher.c:237:5: note: referencing argument 4 of type 'const uint8_t[8]' {aka 'const unsigned char[8]'}
pi-cipher.c: pi-cipher.c:237:5: note: referencing argument 5 of type 'const uint8_t[4]' {aka 'const unsigned char[4]'}
pi-cipher.c: pi-cipher.c:175:13: note: in a call to function 'phi'
pi-cipher.c: 175 | static void phi(
pi-cipher.c: | ^~~
pi-cipher.c: In function 'mu',
pi-cipher.c: inlined from 'ast' at pi-cipher.c:257:5:
pi-cipher.c: pi-cipher.c:226:5: warning: 'phi' reading 8 bytes from a region of size 4 [-Wstringop-overread]
pi-cipher.c: 226 | phi(t, x, mu_const, mu_v_const, mu_rot_const);
pi-cipher.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pi-cipher.c: pi-cipher.c:226:5: note: referencing argument 4 of type 'const uint8_t[8]' {aka 'const unsigned char[8]'}
pi-cipher.c: pi-cipher.c:226:5: note: referencing argument 5 of type 'const uint8_t[4]' {aka 'const unsigned char[4]'}
pi-cipher.c: ...

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

Compiler output

Implementation: T:ref2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE
pi-cipher.c: pi-cipher.c: In function 'mu':
pi-cipher.c: pi-cipher.c:226:5: warning: 'phi' reading 8 bytes from a region of size 4 [-Wstringop-overread]
pi-cipher.c: 226 | phi(t, x, mu_const, mu_v_const, mu_rot_const);
pi-cipher.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pi-cipher.c: pi-cipher.c:226:5: note: referencing argument 4 of type 'const uint8_t[8]' {aka 'const unsigned char[8]'}
pi-cipher.c: pi-cipher.c:226:5: note: referencing argument 5 of type 'const uint8_t[4]' {aka 'const unsigned char[4]'}
pi-cipher.c: pi-cipher.c:175:13: note: in a call to function 'phi'
pi-cipher.c: 175 | static void phi(
pi-cipher.c: | ^~~
pi-cipher.c: pi-cipher.c: In function 'ny':
pi-cipher.c: pi-cipher.c:237:5: warning: 'phi' reading 8 bytes from a region of size 4 [-Wstringop-overread]
pi-cipher.c: 237 | phi(dest, x, ny_const, ny_v_const, ny_rot_const);
pi-cipher.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pi-cipher.c: pi-cipher.c:237:5: note: referencing argument 4 of type 'const uint8_t[8]' {aka 'const unsigned char[8]'}
pi-cipher.c: pi-cipher.c:237:5: note: referencing argument 5 of type 'const uint8_t[4]' {aka 'const unsigned char[4]'}
pi-cipher.c: pi-cipher.c:175:13: note: in a call to function 'phi'
pi-cipher.c: 175 | static void phi(
pi-cipher.c: | ^~~
pi-cipher.c: In function 'mu',
pi-cipher.c: inlined from 'ast' at pi-cipher.c:257:5,
pi-cipher.c: inlined from 'e1' at pi-cipher.c:271:9,
pi-cipher.c: inlined from 'pi' at pi-cipher.c:305:9:
pi-cipher.c: pi-cipher.c:226:5: warning: 'phi' reading 8 bytes from a region of size 4 [-Wstringop-overread]
pi-cipher.c: 226 | phi(t, x, mu_const, mu_v_const, mu_rot_const);
pi-cipher.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pi-cipher.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref2