Skip to content

Commit 12fd7c9

Browse files
committed
Fix ExtractNarrowingSaturateScalar, ExtractNarrowingSaturateUnsignedScalar
1 parent f31aec1 commit 12fd7c9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/mono/mono/mini/mini-llvm.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5098,9 +5098,9 @@ scalar_op_from_vector_op_process_args (ScalarOpFromVectorOpCtx *sctx, LLVMValueR
50985098
static LLVMValueRef
50995099
scalar_op_from_vector_op_process_result (ScalarOpFromVectorOpCtx *sctx, LLVMValueRef result)
51005100
{
5101-
if (!sctx->needs_fake_scalar_op)
5102-
return vector_from_scalar_ty (sctx->ctx, sctx->return_type, result);
5103-
return keep_lowest_element (sctx->ctx, result);
5101+
if (sctx->needs_fake_scalar_op)
5102+
return keep_lowest_element (sctx->ctx, result);
5103+
return vector_from_scalar_ty (sctx->ctx, sctx->return_type, result);
51045104
}
51055105

51065106
static void
@@ -9916,6 +9916,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
99169916
unsigned int argelems = LLVMGetVectorSize (arg_t);
99179917
LLVMValueRef arg = undef_upper_elements (ctx, LLVMVectorType (argelem_t, argelems * 2), lhs);
99189918
result = call_overloaded_intrins (ctx, iid, ovr_tag, &arg, "arm64_xnarrow_scalar");
9919+
result = keep_lowest_element (ctx, result);
99199920
}
99209921
values [ins->dreg] = result;
99219922
break;

0 commit comments

Comments
 (0)