This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Loop-iv.c ICEs on subregs


On Nov 26, 2010, at 3:51 AM, Zdenek Dvorak wrote:

> Hi,
> 
>> I'm investigating an ICE in loop-iv.c:get_biv_step().  I hope you can shed some light on what the correct fix would be.
>> 
>> The ICE happens when processing:
>> ==
>> (insn 111 (set (reg:SI 304)
>>               (plus (subreg:SI (reg:DI 251) 4)
>>                     (const_int 1))))
>> 
>> (insn 177 (set (subreg:SI (reg:DI 251))
>>               (reg:SI 304)))
>> ==
...
> 
> loop iv analysis currently does not handle assignments to subregs
...
> So, if such a code
> gets produced consistently for a large fraction of the loops, it would be
> necessary to teach loop-iv to analyze induction variables represented in
> subregs.  This would mean a more involved rewrite of loop-iv, though,

I see.  In that case a simpler way to fix the problem may be to move Tom's extension elimination pass /after/ loop optimizers.  Do you (or anyone reading this thread) have suggestions on what would be a good spot in the optimization pipeline for sign- and zero-extension elimination pass?

Thanks,

--
Maxim Kuvyrkov
CodeSourcery
+1-650-331-3385 x724


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]