Implement simd_round_ties_even for miri, cg_clif and cg_gcc
This commit is contained in:
parent
2038405ff7
commit
2ffa1dd392
4 changed files with 16 additions and 1 deletions
|
|
@ -495,7 +495,8 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
|
|||
| sym::simd_flog
|
||||
| sym::simd_flog10
|
||||
| sym::simd_flog2
|
||||
| sym::simd_round => {
|
||||
| sym::simd_round
|
||||
| sym::simd_round_ties_even => {
|
||||
intrinsic_args!(fx, args => (a); intrinsic);
|
||||
|
||||
if !a.layout().ty.is_simd() {
|
||||
|
|
@ -526,6 +527,8 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
|
|||
(sym::simd_flog2, types::F64) => "log2",
|
||||
(sym::simd_round, types::F32) => "roundf",
|
||||
(sym::simd_round, types::F64) => "round",
|
||||
(sym::simd_round_ties_even, types::F32) => "rintf",
|
||||
(sym::simd_round_ties_even, types::F64) => "rint",
|
||||
_ => unreachable!("{:?}", intrinsic),
|
||||
};
|
||||
fx.lib_call(
|
||||
|
|
|
|||
|
|
@ -779,6 +779,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
|
|||
sym::simd_fsin => "sin",
|
||||
sym::simd_fsqrt => "sqrt",
|
||||
sym::simd_round => "round",
|
||||
sym::simd_round_ties_even => "rint",
|
||||
sym::simd_trunc => "trunc",
|
||||
_ => return_error!(InvalidMonomorphization::UnrecognizedIntrinsic { span, name }),
|
||||
};
|
||||
|
|
@ -826,6 +827,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
|
|||
| sym::simd_fsin
|
||||
| sym::simd_fsqrt
|
||||
| sym::simd_round
|
||||
| sym::simd_round_ties_even
|
||||
| sym::simd_trunc
|
||||
) {
|
||||
return simd_simple_float_intrinsic(name, in_elem, in_ty, in_len, bx, span, args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue