This is the mail archive of the gcc-bugs@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: More CFG branch merge lossage


> 
> Jan,
> 
> Here's another bug that seems to be a result of your recent CFG merges.
> 
> On an ARM target (arm-netbsd/arm-elf), the following code will abort in 
> verify_local_live_at_start() when called after sched2.
> 
> This is causing a bootstrap failure while building jcf-write.c
> 
> void foo(int);
> 
> void f (int a, int b, int c)
> {
>   int x;
> 
>   if (a)
>     x = b > 0 ? 7 : 0;
>   else
>     x = c > 0 ? 9 : 0;
> 
>   foo(x);
> }

I see what is going on.  I believed there is no conditional liveness before
if_converison pass done after reload, but in this case there is condtiional
move already that is split to predicated execution in split_all_insns just
before life pass, so the liveness already is conditional and we fail to
update liveness after cfg_cleanup properly.

I am not sure how to fix it.  How updating of liveness is supposed to work
with predicated execution. Is it supposed to work at all?

My temporary fix sent to the patches list doing clenaup_cfg before liveness
appears to work.

Honza
> 
> Until reload is completed, the two asignement expressions are handled as 
> if_then_else expressions.  After reload these are split into conditional 
> execution insns.  The new feature seems to be that the false arms of both 
> expressions are being merged and that this is sufficient to confuse the 
> conditional-life tracking that we perform.
> 
> R.


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