Missed optimization: concatenating fixed-size arrays #70439
Labels
A-codegen
Area: Code generation
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following three functions are the same semantically - they pack two
u64
s into 16 bytes in big-endian order, but produce different assembly:Credits to @memoryruins for coming up with
test3
.Godbolt link: https://godbolt.org/z/4QaBp4
It is surprising that naive implementation (
test1
) produces worse assembly than the other two. I was told I should report this here as a bug.Meta
rustc 1.42.0 (as reported by godbolt)
The text was updated successfully, but these errors were encountered: