Skip to content

Commit 9282a64

Browse files
committed
intrinsics: use GLOp::RoundEven for round_ties_even.
1 parent 6d7c1cd commit 9282a64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/rustc_codegen_spirv/src/builder/intrinsics.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,10 @@ impl<'a, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'tcx> {
198198
sym::floorf32 | sym::floorf64 => self.gl_op(GLOp::Floor, ret_ty, [args[0].immediate()]),
199199
sym::ceilf32 | sym::ceilf64 => self.gl_op(GLOp::Ceil, ret_ty, [args[0].immediate()]),
200200
sym::truncf32 | sym::truncf64 => self.gl_op(GLOp::Trunc, ret_ty, [args[0].immediate()]),
201+
sym::rintf32 | sym::rintf64 => {
202+
self.gl_op(GLOp::RoundEven, ret_ty, [args[0].immediate()])
203+
}
201204
// TODO: Correctness of all these rounds
202-
sym::rintf32 | sym::rintf64 => self.gl_op(GLOp::Round, ret_ty, [args[0].immediate()]),
203205
sym::nearbyintf32 | sym::nearbyintf64 | sym::roundf32 | sym::roundf64 => {
204206
self.gl_op(GLOp::Round, ret_ty, [args[0].immediate()])
205207
}

0 commit comments

Comments
 (0)