From fcd97bc327238511142e1cfec4b151689637c9a7 Mon Sep 17 00:00:00 2001 From: Lukas Diekmann Date: Tue, 12 Nov 2024 15:31:30 +0000 Subject: [PATCH] Fix div. --- ykrt/src/compile/jitc_yk/trace_builder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ykrt/src/compile/jitc_yk/trace_builder.rs b/ykrt/src/compile/jitc_yk/trace_builder.rs index d0d5a22fe..b548a5897 100644 --- a/ykrt/src/compile/jitc_yk/trace_builder.rs +++ b/ykrt/src/compile/jitc_yk/trace_builder.rs @@ -150,7 +150,7 @@ impl TraceBuilder { aot_ir::Ty::Integer(it) => it.num_bits(), _ => unreachable!(), }; - let width_bytes = usize::try_from(width_bits).unwrap() / 8; + let width_bytes = usize::try_from(width_bits.div_ceil(8)).unwrap(); self.promote_idx += width_bytes; } _ => (),