diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2021-11-11 20:32:18 -0800 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2021-11-11 20:32:18 -0800 |
| commit | 71f5cfb21f3fd2f1740bced061c66ff112fec259 (patch) | |
| tree | 38e7d3c08601da65ab64a796fc895d7f35d48166 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 14a2fd640e0df9ee8cc1e04280b0c3aff93c42da (diff) | |
| download | rust-71f5cfb21f3fd2f1740bced061c66ff112fec259.tar.gz rust-71f5cfb21f3fd2f1740bced061c66ff112fec259.zip | |
MIRI says `reverse` is UB, so replace it with an implementation that LLVM can vectorize
For small types with padding, the current implementation is UB because it does integer operations on uninit values. But LLVM has gotten smarter since I wrote the previous implementation in 2017, so remove all the manual magic and just write it in such a way that LLVM will vectorize. This code is much simpler (albeit nuanced) and has very little `unsafe`, and is actually faster to boot!
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
