> -----Original Message-----
> From: Richard Henderson <richard.hender...@linaro.org>
> Sent: Sunday, February 26, 2023 10:42 PM
> To: qemu-devel@nongnu.org
> Cc: qemu-...@nongnu.org; qemu-...@nongnu.org; qemu-
> ri...@nongnu.org; qemu-s3...@nongnu.org; jcmvb...@gmail.com;
> kbast...@mail.uni-paderborn.de; ys...@users.sourceforge.jp;
> gaos...@loongson.cn; jiaxun.y...@flygoat.com; Taylor Simpson
> <tsimp...@quicinc.com>; a...@rev.ng; mrol...@gmail.com;
> edgar.igles...@gmail.com
> Subject: [PATCH 17/70] target/hexagon/idef-parser: Use gen_tmp for
> gen_pred_assign
>
> The allocation is immediately followed by tcg_gen_mov_i32, so the initial
> assignment of zero is discarded.
>
> Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
> ---
> target/hexagon/idef-parser/parser-helpers.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/hexagon/idef-parser/parser-helpers.c
> b/target/hexagon/idef-parser/parser-helpers.c
> index be979dac86..760e499149 100644
> --- a/target/hexagon/idef-parser/parser-helpers.c
> +++ b/target/hexagon/idef-parser/parser-helpers.c
> @@ -1743,7 +1743,7 @@ void gen_pred_assign(Context *c, YYLTYPE *locp,
> HexValue *left_pred,
> "Predicate assign not allowed in ternary!");
> /* Extract predicate TCGv */
> if (is_direct) {
> - *left_pred = gen_tmp_value(c, locp, "0", 32, UNSIGNED);
> + *left_pred = gen_tmp(c, locp, 32, UNSIGNED);
> }
> /* Extract first 8 bits, and store new predicate value */
> OUT(c, locp, "tcg_gen_mov_i32(", left_pred, ", ", &r, ");\n");
Let's combine this OUT statement with the next one
- OUT(c, locp, "tcg_gen_mov_i32(", left_pred, ", ", &r, ");\n");
- OUT(c, locp, "tcg_gen_andi_i32(", left_pred, ", ", left_pred,
+ OUT(c, locp, "tcg_gen_andi_i32(", left_pred, ", ", &r,
", 0xff);\n");
Otherwise,
Reviewed-by: Taylor Simpson <tsimp...@quicinc.com>