vshrq_n_u8 does not generate ushr instruction when used in loop #82072
Labels
A-codegen
Area: Code generation
A-SIMD
Area: SIMD (Single Instruction Multiple Data)
C-bug
Category: This is a bug.
O-Arm
Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
https://godbolt.org/z/5dzxf6
I expected to see this happen: the
ushr
instruction used twice, sincevshrq_n_u8
is documented as generating theushr
instructionInstead, this happened: the
ushr
is used once, and then 16 single byte load and shift instructions are usedIf the loop range is changed to
0..1
then a singleushr
instruction is generated, so it seems to be an issue optimizing the second iteration of the loop correctly.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: