diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-10-23 16:22:55 +0200 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-10-23 16:22:55 +0200 |
| commit | e54a13f18bf2873f12d556fb05bb60f2a7f75bfa (patch) | |
| tree | aa307e1924204c6108c4a5fdf139ec643bf9ab47 /compiler/rustc_codegen_cranelift/src/intrinsics/llvm.rs | |
| parent | 9be2f35a4c1ed1b04aa4a6945b64763f599259ff (diff) | |
| parent | 266e96785ab71834b917bf474f130a6d8fdecd4b (diff) | |
| download | rust-e54a13f18bf2873f12d556fb05bb60f2a7f75bfa.tar.gz rust-e54a13f18bf2873f12d556fb05bb60f2a7f75bfa.zip | |
Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into sync_cg_clif-2022-10-23
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/intrinsics/llvm.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/intrinsics/llvm.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/llvm.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/llvm.rs index a799dca938e..783d426c30b 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/llvm.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/llvm.rs @@ -14,6 +14,10 @@ pub(crate) fn codegen_llvm_intrinsic_call<'tcx>( target: Option<BasicBlock>, ) { match intrinsic { + "llvm.x86.sse2.pause" | "llvm.aarch64.isb" => { + // Spin loop hint + } + // Used by `_mm_movemask_epi8` and `_mm256_movemask_epi8` "llvm.x86.sse2.pmovmskb.128" | "llvm.x86.avx2.pmovmskb" | "llvm.x86.sse2.movmsk.pd" => { intrinsic_args!(fx, args => (a); intrinsic); @@ -25,8 +29,7 @@ pub(crate) fn codegen_llvm_intrinsic_call<'tcx>( let mut res = fx.bcx.ins().iconst(types::I32, 0); for lane in (0..lane_count).rev() { - let a_lane = - a.value_field(fx, mir::Field::new(lane.try_into().unwrap())).load_scalar(fx); + let a_lane = a.value_lane(fx, lane).load_scalar(fx); // cast float to int let a_lane = match lane_ty { |
