diff options
author | Jeff Law <jlaw@ventanamicro.com> | 2024-08-22 12:48:49 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2024-08-22 13:13:30 -0600 |
commit | c9377734b798d8d311dfd3a5618dc49407703b93 (patch) | |
tree | 8f13b415ae494582b633a99cd22782dc65a65d24 /gcc/coverage.cc | |
parent | 8e0da56f18b3678beee9d2bae27e08a0e122573a (diff) | |
download | gcc-c9377734b798d8d311dfd3a5618dc49407703b93.zip gcc-c9377734b798d8d311dfd3a5618dc49407703b93.tar.gz gcc-c9377734b798d8d311dfd3a5618dc49407703b93.tar.bz2 |
[PR rtl-optimization/116420] Fix interesting block bitmap DF dataflow
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.
Fixed in the obvious way, by using last_basic_block instead.
Bootstrapped and regression tested on x86_64. Pushing to the trunk.
PR rtl-optimization/116420
gcc/
* ext-dce.cc (ext_dce_init): Fix loop iteration when setting up the
interesting block for DF to analyze.
gcc/testsuite
* gcc.dg/torture/pr116420.c: New test.
Diffstat (limited to 'gcc/coverage.cc')
0 files changed, 0 insertions, 0 deletions