qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 19/64] tcg/optimize: Fold movcond 0/1 into se


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v4 19/64] tcg/optimize: Fold movcond 0/1 into setcond
Date: Tue, 6 Dec 2016 08:33:49 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 12/06/2016 08:22 AM, Alex Bennée wrote:
>> > +                if (fv == 1 && tv == 0) {
>> > +                    cond = tcg_invert_cond(cond);
>> > +                } else if (!(tv == 1 && fv == 0)) {
>> > +                    goto do_default;
>> > +                }
> Why the weird exit early here on an inverted test. Couldn't it just be
> 
>                 } else if (tv == 1 && fv == 0) {
>                     args[3] = cond;
>                     op->opc = opc = (opc == INDEX_op_movcond_i32
>                                      ? INDEX_op_setcond_i32
>                                      : INDEX_op_setcond_i64);
>                     nb_iargs = 2;
>                 }
> 
> And fall through to the goto do_default as before?
> 

Not if you want to share the update code with the first case above.


r~



reply via email to

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