qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 46/48] tcg/optimize: Propagate sign info for setcond


From: Richard Henderson
Subject: [PATCH v2 46/48] tcg/optimize: Propagate sign info for setcond
Date: Thu, 7 Oct 2021 12:54:54 -0700

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.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/optimize.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tcg/optimize.c b/tcg/optimize.c
index 71e97ccd99..1c106bfbc3 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1689,6 +1689,7 @@ static bool fold_setcond(OptContext *ctx, TCGOp *op)
     }
 
     ctx->z_mask = 1;
+    ctx->s_mask = smask_from_zmask(1);
     return false;
 }
 
@@ -1761,6 +1762,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.25.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]