about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-11-10 19:58:14 +0000
committerbors <bors@rust-lang.org>2018-11-10 19:58:14 +0000
commit6e9b84296223126a0a59bde63a0f97011bb7b0f5 (patch)
tree5c9fdd5de3e7e7c4f1d1b82344deaa9d1ae5c53e /src/libstd/sys/unix/stack_overflow.rs
parent42959a24a14e86804b81a3f8f8ecf78c367f370f (diff)
parent4c40ff6a2472124cd061721463f329184ca76fa3 (diff)
downloadrust-6e9b84296223126a0a59bde63a0f97011bb7b0f5.tar.gz
rust-6e9b84296223126a0a59bde63a0f97011bb7b0f5.zip
Auto merge of #55650 - nikic:funnel-shift, r=nagisa
Implement rotate using funnel shift on LLVM >= 7

Implement the rotate_left and rotate_right operations using
llvm.fshl and llvm.fshr if they are available (LLVM >= 7).

Originally I wanted to expose the funnel_shift_left and
funnel_shift_right intrinsics and implement rotate_left and
rotate_right on top of them. However, emulation of funnel
shifts requires emitting a conditional to check for zero shift
amount, which is not necessary for rotates. I was uncomfortable
doing that here, as I don't want to rely on LLVM to optimize
away that conditional (and for variable rotates, I'm not sure it
can). We should revisit that question when we raise our minimum
version requirement to LLVM 7 and don't need emulation code
anymore.

Fixes #52457.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions