On 06/04/2015 12:53 PM, Aurelien Jarno wrote:
> +
>  static void tcg_opt_gen_mov(TCGContext *s, TCGOp *op, TCGArg *args,
>                              TCGArg dst, TCGArg src)
>  {
> +    if (temps[src].state == TCG_TEMP_CONST) {
> +        tcg_opt_gen_movi(s, op, args, dst, temps[src].val);
> +        return;
> +    }
> +
>      if (temps_are_copies(dst, src)) {
>          tcg_op_remove(s, op);
>          return;

I was going to comment re patch 3/5, but here's better, since it actually
tidies up all the places I would have pointed out.

I think you should check for copies first, and only then do the TEMP_CONST
check.  That way we get to remove an op.


r~


Reply via email to