Implementation notes: amd64, cherry, crypto_kem/ntskem1380

Computer: cherry
Microarchitecture: amd64; Silvermont (406c4)
Architecture: amd64
CPU ID: GenuineIntel-000406c4-bfebfbff
SUPERCOP version: 20240625
Operation: crypto_kem
Primitive: ntskem1380
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
3018556122364 84 16141098 948 1720T:sse2clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
310247193570 84 16110698 948 1720T:sse2clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
323308395340 84 16113802 932 1784T:sse2gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
334138891361 84 16107808 940 1720T:sse2clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
337332880622 84 1697898 932 1784T:sse2gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
3667788109452 84 16129682 948 1720T:optclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
380519469816 84 1685345 924 1752T:sse2gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
395670777079 84 1692768 940 1720T:sse2clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
401485878573 84 1695330 932 1784T:sse2gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
4160030133713 84 16153450 948 1720T:optclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
439458269378 84 1687722 932 1784T:optgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
445004685144 84 16103104 940 1720T:optclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
452298988236 84 16108290 932 1784T:optgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
465173863026 84 1679969 924 1752T:optgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
485635370733 84 1687936 940 1720T:optclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
528665071689 84 1690642 932 1784T:optgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
567702490522 84 16109122 948 1720T:optclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
2852973034828 76 1653610 932 1720T:refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
2857296436417 76 1656850 932 1720T:refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
3166566643316 76 1663370 932 1720T:refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
3266013822155 76 1639376 924 1720T:refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
3394627236562 76 1656546 900 1784T:refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
3639671627133 76 1646066 900 1784T:refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
3662504724204 76 1642570 900 1784T:refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
3675153824425 76 1642376 924 1720T:refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
3692858419927 76 1636825 892 1752T:refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625

Compiler output


bitslice_fft_256.c: bitslice_fft_256.c:99:25: error: always_inline function '_mm256_set_epi64x' requires target feature 'avx', but would be inlined into function 'bitslice_butterflies13_256' that is compiled without support for 'avx'
bitslice_fft_256.c:             out[j][i] = _mm256_set_epi64x(-v3, -v2, -v1, -v0);
bitslice_fft_256.c:                         ^
bitslice_fft_256.c: bitslice_fft_256.c:99:25: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
bitslice_fft_256.c: bitslice_fft_256.c:112:20: error: '__builtin_ia32_permdi256' needs target feature avx2
bitslice_fft_256.c:             t[0] = _mm256_permute4x64_epi64(out[ j ][b], 0xD8);
bitslice_fft_256.c:                    ^
bitslice_fft_256.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/avx2intrin.h:818:12: note: expanded from macro '_mm256_permute4x64_epi64'
bitslice_fft_256.c:   (__m256i)__builtin_ia32_permdi256((__v4di)(__m256i)(V), (int)(M))
bitslice_fft_256.c:            ^
bitslice_fft_256.c: bitslice_fft_256.c:113:20: error: '__builtin_ia32_permdi256' needs target feature avx2
bitslice_fft_256.c:             t[1] = _mm256_permute4x64_epi64(out[j+1][b], 0xD8);
bitslice_fft_256.c:                    ^
bitslice_fft_256.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/avx2intrin.h:818:12: note: expanded from macro '_mm256_permute4x64_epi64'
bitslice_fft_256.c:   (__m256i)__builtin_ia32_permdi256((__v4di)(__m256i)(V), (int)(M))
bitslice_fft_256.c:            ^
bitslice_fft_256.c: bitslice_fft_256.c:114:20: error: '__builtin_ia32_permti256' needs target feature avx2
bitslice_fft_256.c:             v[b] = _mm256_permute2x128_si256(t[0], t[1], 0x20);
bitslice_fft_256.c:                    ^
bitslice_fft_256.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/avx2intrin.h:821:12: note: expanded from macro '_mm256_permute2x128_si256'
bitslice_fft_256.c:   (__m256i)__builtin_ia32_permti256((__m256i)(V1), (__m256i)(V2), (int)(M))
bitslice_fft_256.c:            ^
bitslice_fft_256.c: bitslice_fft_256.c:115:20: error: '__builtin_ia32_permti256' needs target feature avx2
bitslice_fft_256.c:             u[b] = _mm256_permute2x128_si256(t[0], t[1], 0x31);
bitslice_fft_256.c:                    ^
bitslice_fft_256.c: ...

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:avx2clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)
T:avx2clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)
T:avx2clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)
T:avx2clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

Compiler output


bitslice_bma_128.c: bitslice_bma_128.c:92:12: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'bit_reverse' that is compiled without support for 'ssse3'
bitslice_bma_128.c:     return _mm_shuffle_epi8(x, _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15));
bitslice_bma_128.c:            ^
bitslice_bma_128.c: 1 error generated.

Number of similar (implementation,compiler) pairs: 2, namely:
ImplementationCompiler
T:avx2clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)
T:sse2clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

Compiler output


bitslice_fft_256.c: bitslice_fft_256.c: In function 'bitslice_butterflies13_256':
bitslice_fft_256.c: bitslice_fft_256.c:99:23: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
bitslice_fft_256.c:    99 |             out[j][i] = _mm256_set_epi64x(-v3, -v2, -v1, -v0);
bitslice_fft_256.c:       |             ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_fft_256.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:51,
bitslice_fft_256.c:                  from bitslice_fft_256.h:21,
bitslice_fft_256.c:                  from bitslice_fft_256.c:18:
bitslice_fft_256.c: /usr/lib/gcc/x86_64-linux-gnu/10/include/avxintrin.h:1296:1: error: inlining failed in call to 'always_inline' '_mm256_set_epi64x': target specific option mismatch
bitslice_fft_256.c:  1296 | _mm256_set_epi64x (long long __A, long long __B, long long __C,
bitslice_fft_256.c:       | ^~~~~~~~~~~~~~~~~
bitslice_fft_256.c: bitslice_fft_256.c:99:25: note: called from here
bitslice_fft_256.c:    99 |             out[j][i] = _mm256_set_epi64x(-v3, -v2, -v1, -v0);
bitslice_fft_256.c:       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_fft_256.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
bitslice_fft_256.c:                  from bitslice_fft_256.h:21,
bitslice_fft_256.c:                  from bitslice_fft_256.c:18:
bitslice_fft_256.c: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:1081:1: error: inlining failed in call to 'always_inline' '_mm256_permute2x128_si256': target specific option mismatch
bitslice_fft_256.c:  1081 | _mm256_permute2x128_si256 (__m256i __X, __m256i __Y, const int __M)
bitslice_fft_256.c:       | ^~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_fft_256.c: bitslice_fft_256.c:115:20: note: called from here
bitslice_fft_256.c:   115 |             u[b] = _mm256_permute2x128_si256(t[0], t[1], 0x31);
bitslice_fft_256.c:       |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_fft_256.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
bitslice_fft_256.c:                  from bitslice_fft_256.h:21,
bitslice_fft_256.c:                  from bitslice_fft_256.c:18:
bitslice_fft_256.c: ...

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:avx2gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (10.2.1_20210110)
T:avx2gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (10.2.1_20210110)
T:avx2gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (10.2.1_20210110)
T:avx2gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (10.2.1_20210110)