Implement simd_round_ties_even for miri, cg_clif and cg_gcc

This commit is contained in:
sayantn
2025-06-05 20:41:41 +05:30
parent 2038405ff7
commit 2ffa1dd392
4 changed files with 16 additions and 1 deletions

View File

@@ -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(