https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116420

--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Fun.

The DF framework provides us a way to run dataflow problems on sub-graphs. 
Naturally a bitmap of interesting blocks is passed into those routines.   At a
confluence point, the DF framework will not mark a block for re-processing if
it's not in that set of interesting blocks.

When ext-dce sets up that set of interesting blocks it's using the wrong
counter.  ie, it's using n_basic_blocks rather than last_basic_block.  If there
are holes in the block indices, some number of blocks won't get marked as
interesting.

In this case the block needing reprocessing has an index higher than
n_basic_blocks.  It never gets reprocessed and the newly found live chunks
don't propagate further up the CFG -- ultimately resulting in a pseudo
appearing to have only the low 8 bits live, when in fact the low 32 bits are
actually live.

Testing a pretty obvious fix.

Reply via email to