From 275d7d8e70ef8679e241ce78c83548067f403394 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 26 Aug 2021 13:20:39 -0700 Subject: [PATCH] tcg/optimize: Propagate sign info for setcond MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The result is either 0 or 1, which means that we have a 2 bit signed result, and thus 62 bits of sign. For clarity, use the smask_from_zmask function. Reviewed-by: Alex Bennée Reviewed-by: Luis Pires Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index de1abd9cc3d..5fa4d7285d5 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1730,6 +1730,7 @@ static bool fold_setcond(OptContext *ctx, TCGOp *op) } ctx->z_mask = 1; + ctx->s_mask = smask_from_zmask(1); return false; } @@ -1802,6 +1803,7 @@ static bool fold_setcond2(OptContext *ctx, TCGOp *op) } ctx->z_mask = 1; + ctx->s_mask = smask_from_zmask(1); return false; do_setcond_const: -- 2.39.5