about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2021-11-11 20:32:18 -0800
committerScott McMurray <scottmcm@users.noreply.github.com>2021-11-11 20:32:18 -0800
commit71f5cfb21f3fd2f1740bced061c66ff112fec259 (patch)
tree38e7d3c08601da65ab64a796fc895d7f35d48166 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent14a2fd640e0df9ee8cc1e04280b0c3aff93c42da (diff)
downloadrust-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