Implementation notes: amd64, cherry, crypto_encrypt/ntruees401ep2

Computer: cherry
Microarchitecture: amd64; Silvermont (406c4)
Architecture: amd64
CPU ID: GenuineIntel-000406c4-bfebfbff
SUPERCOP version: 20240625
Operation: crypto_encrypt
Primitive: ntruees401ep2

Compiler output


ntru_crypto_ntru_poly.c: ntru_crypto_ntru_poly.c:1002:17: error: argument value 65535 is outside the valid range [0, 255] [-Wargument-outside-range]
ntru_crypto_ntru_poly.c:     abroad[0] = _mm_shuffle_epi32(ai8h, 0xFFFF);
ntru_crypto_ntru_poly.c:                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ntru_crypto_ntru_poly.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/emmintrin.h:4433:12: note: expanded from macro '_mm_shuffle_epi32'
ntru_crypto_ntru_poly.c:   (__m128i)__builtin_ia32_pshufd((__v4si)(__m128i)(a), (int)(imm))
ntru_crypto_ntru_poly.c:            ^                                           ~~~~~~~~~~
ntru_crypto_ntru_poly.c: ntru_crypto_ntru_poly.c:1003:17: error: argument value 43690 is outside the valid range [0, 255] [-Wargument-outside-range]
ntru_crypto_ntru_poly.c:     abroad[1] = _mm_shuffle_epi32(ai8h, 0xAAAA);
ntru_crypto_ntru_poly.c:                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ntru_crypto_ntru_poly.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/emmintrin.h:4433:12: note: expanded from macro '_mm_shuffle_epi32'
ntru_crypto_ntru_poly.c:   (__m128i)__builtin_ia32_pshufd((__v4si)(__m128i)(a), (int)(imm))
ntru_crypto_ntru_poly.c:            ^                                           ~~~~~~~~~~
ntru_crypto_ntru_poly.c: ntru_crypto_ntru_poly.c:1004:17: error: argument value 21845 is outside the valid range [0, 255] [-Wargument-outside-range]
ntru_crypto_ntru_poly.c:     abroad[2] = _mm_shuffle_epi32(ai8h, 0x5555);
ntru_crypto_ntru_poly.c:                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ntru_crypto_ntru_poly.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/emmintrin.h:4433:12: note: expanded from macro '_mm_shuffle_epi32'
ntru_crypto_ntru_poly.c:   (__m128i)__builtin_ia32_pshufd((__v4si)(__m128i)(a), (int)(imm))
ntru_crypto_ntru_poly.c:            ^                                           ~~~~~~~~~~
ntru_crypto_ntru_poly.c: ntru_crypto_ntru_poly.c:1007:17: error: argument value 65535 is outside the valid range [0, 255] [-Wargument-outside-range]
ntru_crypto_ntru_poly.c:     abroad[4] = _mm_shuffle_epi32(ai8l, 0xFFFF);
ntru_crypto_ntru_poly.c:                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ntru_crypto_ntru_poly.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/emmintrin.h:4433:12: note: expanded from macro '_mm_shuffle_epi32'
ntru_crypto_ntru_poly.c:   (__m128i)__builtin_ia32_pshufd((__v4si)(__m128i)(a), (int)(imm))
ntru_crypto_ntru_poly.c:            ^                                           ~~~~~~~~~~
ntru_crypto_ntru_poly.c: ntru_crypto_ntru_poly.c:1008:17: error: argument value 43690 is outside the valid range [0, 255] [-Wargument-outside-range]
ntru_crypto_ntru_poly.c: ...

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

Compiler output


ntru_crypto_sha1.c: ntru_crypto_sha1.c:85:33: warning: '&' within '^' [-Wbitwise-op-parentheses]
ntru_crypto_sha1.c:     E += RL(A, 5) + K00_19 + (B & (C ^ D) ^ D) + data[ 0]; B = RL(B, 30);
ntru_crypto_sha1.c:                               ~~^~~~~~~~~ ~
ntru_crypto_sha1.c: ntru_crypto_sha1.c:85:33: note: place parentheses around the '&' expression to silence this warning
ntru_crypto_sha1.c:     E += RL(A, 5) + K00_19 + (B & (C ^ D) ^ D) + data[ 0]; B = RL(B, 30);
ntru_crypto_sha1.c:                                 ^
ntru_crypto_sha1.c:                               (          )
ntru_crypto_sha1.c: ntru_crypto_sha1.c:86:33: warning: '&' within '^' [-Wbitwise-op-parentheses]
ntru_crypto_sha1.c:     D += RL(E, 5) + K00_19 + (A & (B ^ C) ^ C) + data[ 1]; A = RL(A, 30);
ntru_crypto_sha1.c:                               ~~^~~~~~~~~ ~
ntru_crypto_sha1.c: ntru_crypto_sha1.c:86:33: note: place parentheses around the '&' expression to silence this warning
ntru_crypto_sha1.c:     D += RL(E, 5) + K00_19 + (A & (B ^ C) ^ C) + data[ 1]; A = RL(A, 30);
ntru_crypto_sha1.c:                                 ^
ntru_crypto_sha1.c:                               (          )
ntru_crypto_sha1.c: ntru_crypto_sha1.c:87:33: warning: '&' within '^' [-Wbitwise-op-parentheses]
ntru_crypto_sha1.c:     C += RL(D, 5) + K00_19 + (E & (A ^ B) ^ B) + data[ 2]; E = RL(E, 30);
ntru_crypto_sha1.c:                               ~~^~~~~~~~~ ~
ntru_crypto_sha1.c: ntru_crypto_sha1.c:87:33: note: place parentheses around the '&' expression to silence this warning
ntru_crypto_sha1.c:     C += RL(D, 5) + K00_19 + (E & (A ^ B) ^ B) + data[ 2]; E = RL(E, 30);
ntru_crypto_sha1.c:                                 ^
ntru_crypto_sha1.c:                               (          )
ntru_crypto_sha1.c: ntru_crypto_sha1.c:88:33: warning: '&' within '^' [-Wbitwise-op-parentheses]
ntru_crypto_sha1.c:     B += RL(C, 5) + K00_19 + (D & (E ^ A) ^ A) + data[ 3]; D = RL(D, 30);
ntru_crypto_sha1.c:                               ~~^~~~~~~~~ ~
ntru_crypto_sha1.c: ntru_crypto_sha1.c:88:33: note: place parentheses around the '&' expression to silence this warning
ntru_crypto_sha1.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_11.0.1)

Compiler output


ntru_crypto_sha1.c: ntru_crypto_sha1.c: In function 'sha1_blk':
ntru_crypto_sha1.c: ntru_crypto_sha1.c:85:33: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
ntru_crypto_sha1.c:    85 |     E += RL(A, 5) + K00_19 + (B & (C ^ D) ^ D) + data[ 0]; B = RL(B, 30);
ntru_crypto_sha1.c:       |                               ~~^~~~~~~~~
ntru_crypto_sha1.c: ntru_crypto_sha1.c:86:33: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
ntru_crypto_sha1.c:    86 |     D += RL(E, 5) + K00_19 + (A & (B ^ C) ^ C) + data[ 1]; A = RL(A, 30);
ntru_crypto_sha1.c:       |                               ~~^~~~~~~~~
ntru_crypto_sha1.c: ntru_crypto_sha1.c:87:33: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
ntru_crypto_sha1.c:    87 |     C += RL(D, 5) + K00_19 + (E & (A ^ B) ^ B) + data[ 2]; E = RL(E, 30);
ntru_crypto_sha1.c:       |                               ~~^~~~~~~~~
ntru_crypto_sha1.c: ntru_crypto_sha1.c:88:33: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
ntru_crypto_sha1.c:    88 |     B += RL(C, 5) + K00_19 + (D & (E ^ A) ^ A) + data[ 3]; D = RL(D, 30);
ntru_crypto_sha1.c:       |                               ~~^~~~~~~~~
ntru_crypto_sha1.c: ntru_crypto_sha1.c:89:33: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
ntru_crypto_sha1.c:    89 |     A += RL(B, 5) + K00_19 + (C & (D ^ E) ^ E) + data[ 4]; C = RL(C, 30);
ntru_crypto_sha1.c:       |                               ~~^~~~~~~~~
ntru_crypto_sha1.c: ntru_crypto_sha1.c:90:33: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
ntru_crypto_sha1.c:    90 |     E += RL(A, 5) + K00_19 + (B & (C ^ D) ^ D) + data[ 5]; B = RL(B, 30);
ntru_crypto_sha1.c:       |                               ~~^~~~~~~~~
ntru_crypto_sha1.c: ntru_crypto_sha1.c:91:33: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
ntru_crypto_sha1.c:    91 |     D += RL(E, 5) + K00_19 + (A & (B ^ C) ^ C) + data[ 6]; A = RL(A, 30);
ntru_crypto_sha1.c:       |                               ~~^~~~~~~~~
ntru_crypto_sha1.c: ntru_crypto_sha1.c:92:33: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
ntru_crypto_sha1.c:    92 |     C += RL(D, 5) + K00_19 + (E & (A ^ B) ^ B) + data[ 7]; E = RL(E, 30);
ntru_crypto_sha1.c:       |                               ~~^~~~~~~~~
ntru_crypto_sha1.c: ...

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