Unnecessary loop unrolling to handle tail when tail length has a smaller known size #130795
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-optimization
Category: An issue highlighting optimization opportunities or PRs implementing such
I-slow
Issue: Problems and improvements with respect to performance of generated code.
In the following code, the first
while
loop should process 8 bytes at a time and exit early if an invalid byte is found.The remaining bytes should be known to be
bytes.len() % 8
, but the auto-vectorization unrolls to test again for 32 bytes and 8 bytes at a timehttps://rust.godbolt.org/z/z8hnb9PGY
The text was updated successfully, but these errors were encountered: