From cccd8f2d008734fb9dd63fed2992ec6b65830d57 Mon Sep 17 00:00:00 2001 From: David Mak Date: Thu, 7 Mar 2024 12:56:21 +0800 Subject: [PATCH] core: Fix ndarray_eye not preserving signness of offset --- nac3core/src/toplevel/numpy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nac3core/src/toplevel/numpy.rs b/nac3core/src/toplevel/numpy.rs index 7521291b..9b93ce3b 100644 --- a/nac3core/src/toplevel/numpy.rs +++ b/nac3core/src/toplevel/numpy.rs @@ -635,7 +635,7 @@ fn call_ndarray_eye_impl<'ctx>( let col_with_offset = ctx.builder .build_int_add( col, - ctx.builder.build_int_z_extend_or_bit_cast(offset, llvm_usize, "").unwrap(), + ctx.builder.build_int_s_extend_or_bit_cast(offset, llvm_usize, "").unwrap(), "", ) .unwrap();