Skip to content

Commit b35b1e3

Browse files
committed
Make sure we update the original xconst if we mutate it
1 parent 2995754 commit b35b1e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mono/mono/mini/simd-intrinsics.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ emit_vector_insert_element (
11541154
{
11551155
int op = type_to_insert_op (type);
11561156

1157-
if (is_zero_inited && is_zero_const (element)) {
1157+
if (((is_zero_inited) || (ins->opcode == OP_XZERO)) && is_zero_const (element)) {
11581158
// element already set to zero
11591159
return ins;
11601160
}
@@ -1228,6 +1228,7 @@ emit_vector_insert_element (
12281228
}
12291229
}
12301230
if (ins->opcode == OP_XCONST) {
1231+
memcpy (ins->inst_p0, cns_vec, 16);
12311232
return ins;
12321233
}
12331234
return emit_xconst_v128 (cfg, vklass, cns_vec);

0 commit comments

Comments
 (0)