Skip to content

Commit 22909a1

Browse files
rth7680Michael Tokarev
authored andcommitted
tcg: Fix constant propagation in tcg_reg_alloc_dup
The scalar constant must be replicated for dup. Cc: [email protected] Fixes: bab1671 ("tcg: Manually expand INDEX_op_dup_vec") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3002 Signed-off-by: Richard Henderson <[email protected]> (cherry picked from commit 0d0fc3f4658937fb81fcc16a89738e83bd8d4795) Signed-off-by: Michael Tokarev <[email protected]>
1 parent 46cdfdf commit 22909a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tcg/tcg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4927,7 +4927,7 @@ static void tcg_reg_alloc_dup(TCGContext *s, const TCGOp *op)
49274927

49284928
if (its->val_type == TEMP_VAL_CONST) {
49294929
/* Propagate constant via movi -> dupi. */
4930-
tcg_target_ulong val = its->val;
4930+
tcg_target_ulong val = dup_const(vece, its->val);
49314931
if (IS_DEAD_ARG(1)) {
49324932
temp_dead(s, its);
49334933
}

0 commit comments

Comments
 (0)