diff options
| author | Richard Henderson | 2021-08-26 22:20:39 +0200 |
|---|---|---|
| committer | Richard Henderson | 2021-10-29 05:55:07 +0200 |
| commit | 275d7d8e70ef8679e241ce78c83548067f403394 (patch) | |
| tree | 3edec7f87dc02a54b1a2099640228bf7c91e3ee7 /tcg | |
| parent | tcg/optimize: Propagate sign info for logical operations (diff) | |
| download | qemu-275d7d8e70ef8679e241ce78c83548067f403394.tar.gz qemu-275d7d8e70ef8679e241ce78c83548067f403394.tar.xz qemu-275d7d8e70ef8679e241ce78c83548067f403394.zip | |
tcg/optimize: Propagate sign info for setcond
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 <alex.bennee@linaro.org>
Reviewed-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
| -rw-r--r-- | tcg/optimize.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c index de1abd9cc3..5fa4d7285d 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: |
