Skip to content

Commit

Permalink
Make sure we update the original xconst if we mutate it
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding committed Jul 23, 2024
1 parent 2995754 commit b35b1e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mono/mono/mini/simd-intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ emit_vector_insert_element (
{
int op = type_to_insert_op (type);

if (is_zero_inited && is_zero_const (element)) {
if (((is_zero_inited) || (ins->opcode == OP_XZERO)) && is_zero_const (element)) {
// element already set to zero
return ins;
}
Expand Down Expand Up @@ -1228,6 +1228,7 @@ emit_vector_insert_element (
}
}
if (ins->opcode == OP_XCONST) {
memcpy (ins->inst_p0, cns_vec, 16);
return ins;
}
return emit_xconst_v128 (cfg, vklass, cns_vec);
Expand Down

0 comments on commit b35b1e3

Please sign in to comment.