Skip to content

Commit 8c45692

Browse files
Rollup merge of #142078 - sayantn:more-intrinsics, r=workingjubilee
Add SIMD funnel shift and round-to-even intrinsics This PR adds 3 new SIMD intrinsics - `simd_funnel_shl` - funnel shift left - `simd_funnel_shr` - funnel shift right - `simd_round_ties_even` (vector version of `round_ties_even_fN`) TODO (future PR): implement `simd_fsh{l,r}` in miri, cg_gcc and cg_clif (it is surprisingly hard to implement without branches, the common tricks that rotate uses doesn't work because we have 2 elements now. e.g, the `-n&31` trick used by cg_gcc to implement rotate doesn't work with this because then `fshl(a, b, 0)` will be `a | b`) [#t-compiler > More SIMD intrinsics](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/More.20SIMD.20intrinsics/with/522130286) `@rustbot` label T-compiler T-libs A-intrinsics F-core_intrinsics r? `@workingjubilee`
2 parents a7715a4 + b9382e9 commit 8c45692

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/intrinsic/simd.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
780780
sym::simd_fsin => "sin",
781781
sym::simd_fsqrt => "sqrt",
782782
sym::simd_round => "round",
783+
sym::simd_round_ties_even => "rint",
783784
sym::simd_trunc => "trunc",
784785
_ => return_error!(InvalidMonomorphization::UnrecognizedIntrinsic { span, name }),
785786
};
@@ -827,6 +828,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
827828
| sym::simd_fsin
828829
| sym::simd_fsqrt
829830
| sym::simd_round
831+
| sym::simd_round_ties_even
830832
| sym::simd_trunc
831833
) {
832834
return simd_simple_float_intrinsic(name, in_elem, in_ty, in_len, bx, span, args);

0 commit comments

Comments
 (0)