On Thu, Oct 22, 2015 at 3:47 AM, Segher Boessenkool
<seg...@kernel.crashing.org> wrote:
> Hi,
>
> On Wed, Oct 21, 2015 at 09:44:25AM -0700, Steve Ellcey  wrote:
>> (jump_insn 16 15 17 2 (set (pc)
>>         (if_then_else (ne (subreg:SI (reg:DI 207) 4)
>>                 (subreg:SI (reg:DI 196 [ *last_3(D)+-4 ]) 4))
>>             (label_ref:DI 35)
>>             (pc))) x.c:21 472 {*branch_equalitysi}
>>      (expr_list:REG_DEAD (reg:DI 207)
>>         (int_list:REG_BR_PROB 8010 (nil)))
>>  -> 35)
>
> Why does *branch_equalitysi allow these subregs if it cannot handle them?

It can handle subreg here if the register was signed extended from SI
mode in the first place (I have seen cases where we want to use the
subreg).  In this case combine should not have generated the subreg
but rather truncation for this comparison.  See my other email about
this.

Thanks,
Andrew

> Not just combine can generate code like this (in theory at least).
>
>
> Segher

Reply via email to