]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tcg/optimize: Save o_mask in fold_masks_zosa_int
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 6 Jan 2026 22:51:38 +0000 (09:51 +1100)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 11 Jan 2026 06:31:34 +0000 (17:31 +1100)
When adding o_mask to this function, we used it in a
couple of places but failed to save it for future use.
Also, update a related comment.

Cc: qemu-stable@nongnu.org
Fixes: 56f15f67ea1 ("tcg/optimize: Add one's mask to TempOptInfo")
Reported-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/optimize.c

index f69702b26e82febe1146a82761ecb04a4ead35e1..1f95da487b99d06262313459a6f42be72b8f376d 100644 (file)
@@ -1088,8 +1088,9 @@ static bool fold_masks_zosa_int(OptContext *ctx, TCGOp *op,
 
     ti = ts_info(ts);
     ti->z_mask = z_mask;
+    ti->o_mask = o_mask;
 
-    /* Canonicalize s_mask and incorporate data from z_mask. */
+    /* Canonicalize s_mask and incorporate data from [zo]_mask. */
     rep = clz64(~s_mask);
     rep = MAX(rep, clz64(z_mask));
     rep = MAX(rep, clz64(~o_mask));