-
-
Notifications
You must be signed in to change notification settings - Fork 308
Allow more cases to fall through to CHUNKMEMSET/CHUNKCOPY #1819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ typedef __m128i chunk_t; | |
| #define HAVE_CHUNKMEMSET_2 | ||
| #define HAVE_CHUNKMEMSET_4 | ||
| #define HAVE_CHUNKMEMSET_8 | ||
| #define MIN_CHUNKSIZE sizeof(chunk_t) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification The MIN_CHUNKSIZE definition is inconsistent with AVX2/AVX512 implementations The verification revealed that while
This inconsistency in
🔗 Analysis chainLGTM! The MIN_CHUNKSIZE definition is correct and well-placed. The macro definition correctly uses Let's verify the consistency of MIN_CHUNKSIZE across other architecture files: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify MIN_CHUNKSIZE definition consistency across architecture files
# Expected: All architecture files should define MIN_CHUNKSIZE similarly
# Search for MIN_CHUNKSIZE definitions in architecture files
echo "Checking MIN_CHUNKSIZE definitions:"
rg "MIN_CHUNKSIZE.*sizeof\(chunk_t\)" arch/
# Verify chunk_t definitions to ensure correct sizes
echo -e "\nChecking chunk_t definitions:"
rg "typedef.*chunk_t" arch/
Length of output: 1037 |
||
|
|
||
| static inline void chunkmemset_2(uint8_t *from, chunk_t *chunk) { | ||
| int16_t tmp; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Inconsistent chunk size definition needs attention
The RISC-V implementation defines
CHUNK_SIZEas 32 andMIN_CHUNKSIZEasCHUNK_SIZE, but this differs from other architectures where:The RISC-V implementation uses a struct with 4 uint64_t (32 bytes) because "We don't have a 32-byte datatype for RISC-V arch". While the size is correctly matched to the struct, this inconsistency with other architectures'
MIN_CHUNKSIZEdefinitions (which usesizeof(chunk_t)) should be reviewed.🔗 Analysis chain
LGTM! Verify chunk size consistency.
The
MIN_CHUNKSIZEmacro definition correctly matches theCHUNK_SIZEof 32 bytes, which aligns with thechunk_tstructure size (4 × uint64_t).🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 901
Script:
Length of output: 1436
Script:
Length of output: 3430