[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 54/56] tcg/optimize: Propagate sign info for setcond
From: |
Richard Henderson |
Subject: |
[PULL 54/56] tcg/optimize: Propagate sign info for setcond |
Date: |
Wed, 27 Oct 2021 19:41:29 -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.
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>
---
tcg/optimize.c | 2 ++
1 file changed, 2 insertions(+)
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:
--
2.25.1
- [PULL 44/56] tcg/optimize: Expand fold_mulu2_i32 to all 4-arg multiplies, (continued)
- [PULL 44/56] tcg/optimize: Expand fold_mulu2_i32 to all 4-arg multiplies, Richard Henderson, 2021/10/27
- [PULL 45/56] tcg/optimize: Expand fold_addsub2_i32 to 64-bit ops, Richard Henderson, 2021/10/27
- [PULL 47/56] tcg/optimize: Stop forcing z_mask to "garbage" for 32-bit values, Richard Henderson, 2021/10/27
- [PULL 50/56] tcg/optimize: Use fold_xi_to_x for div, Richard Henderson, 2021/10/27
- [PULL 55/56] tcg/optimize: Propagate sign info for bit counting, Richard Henderson, 2021/10/27
- [PULL 56/56] tcg/optimize: Propagate sign info for shifting, Richard Henderson, 2021/10/27
- [PULL 43/56] tcg/optimize: Split out fold_masks, Richard Henderson, 2021/10/27
- [PULL 51/56] tcg/optimize: Use fold_xx_to_i for rem, Richard Henderson, 2021/10/27
- [PULL 49/56] tcg/optimize: Use fold_xi_to_x for mul, Richard Henderson, 2021/10/27
- [PULL 52/56] tcg/optimize: Optimize sign extensions, Richard Henderson, 2021/10/27
- [PULL 54/56] tcg/optimize: Propagate sign info for setcond,
Richard Henderson <=
- [PULL 53/56] tcg/optimize: Propagate sign info for logical operations, Richard Henderson, 2021/10/27
- Re: [PULL 00/56] tcg patch queue, Richard Henderson, 2021/10/28