Skip to content

Commit f384a40

Browse files
fix(tcg): helper_load_slots moveext1 performed even when conflict detected
1 parent 5b15955 commit f384a40

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tcg/tcg.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6390,6 +6390,7 @@ static void tcg_out_helper_load_slots(TCGContext *s,
63906390
tcg_debug_assert(parm->ntmp >= 2);
63916391

63926392
dst3 = mov[3].dst;
6393+
bool conflict = false;
63936394
for (unsigned j = 0; j < 3; ++j) {
63946395
if (dst3 == mov[j].src) {
63956396
/*
@@ -6402,12 +6403,15 @@ static void tcg_out_helper_load_slots(TCGContext *s,
64026403
tcg_out_mov(s, mov[3].src_type, scratch, mov[3].src);
64036404
tcg_out_movext3(s, mov, mov + 1, mov + 2, parm->tmp[0]);
64046405
tcg_out_movext1_new_src(s, &mov[3], scratch);
6406+
conflict = true;
64056407
break;
64066408
}
64076409
}
64086410

64096411
/* No conflicts: perform this move and continue. */
6410-
tcg_out_movext1(s, &mov[3]);
6412+
if (!conflict) {
6413+
tcg_out_movext1(s, &mov[3]);
6414+
}
64116415
/* fall through */
64126416

64136417
case 3:

0 commit comments

Comments
 (0)