aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-06-28 09:57:53 -0600
committerRichard Henderson <richard.henderson@linaro.org>2025-06-30 07:42:56 -0600
commit0d0fc3f4658937fb81fcc16a89738e83bd8d4795 (patch)
tree36e59b58b5202dd18e3972e5c3259695d105e895
parent169d253e1f25cc4adff6571e249222e422a4b07e (diff)
downloadqemu-0d0fc3f4658937fb81fcc16a89738e83bd8d4795.zip
qemu-0d0fc3f4658937fb81fcc16a89738e83bd8d4795.tar.gz
qemu-0d0fc3f4658937fb81fcc16a89738e83bd8d4795.tar.bz2
tcg: Fix constant propagation in tcg_reg_alloc_dup
The scalar constant must be replicated for dup. Cc: qemu-stable@nongnu.org Fixes: bab1671f0fa ("tcg: Manually expand INDEX_op_dup_vec") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3002 Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--tcg/tcg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index d714ae2..50d40b9 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -5154,7 +5154,7 @@ static void tcg_reg_alloc_dup(TCGContext *s, const TCGOp *op)
if (its->val_type == TEMP_VAL_CONST) {
/* Propagate constant via movi -> dupi. */
- tcg_target_ulong val = its->val;
+ tcg_target_ulong val = dup_const(vece, its->val);
if (IS_DEAD_ARG(1)) {
temp_dead(s, its);
}