]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR rtl-optimization/115877] Fix livein computation for ext-dce
authorJeff Law <jlaw@ventanamicro.com>
Sun, 21 Jul 2024 13:36:37 +0000 (07:36 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sun, 21 Jul 2024 13:36:37 +0000 (07:36 -0600)
commit91e468b72dafc9dcd5dcf7915f1d0ef172264d53
tree74c6cacb557289c1836e48eddae3e7eb1a0f7a9e
parent80c37335bafd323668f2be059da08fd932dbb7eb
[PR rtl-optimization/115877] Fix livein computation for ext-dce

So I'm not yet sure how I'm going to break everything down, but this is easy
enough to break out as 1/N of ext-dce fixes/improvements.

When handling uses in an insn, we first determine what bits are set in the
destination which is represented in DST_MASK.  Then we use that to refine what
bits are live in the source operands.

In the source operand handling section we *modify* DST_MASK if the source
operand is a SUBREG (ugh!).  So if the first operand is a SUBREG, then we can
incorrectly compute which bit groups are live in the second operand, especially
if it is a SUBREG as well.

This was seen when testing a larger set of patches on the rl78 port
(builtin-arith-overflow-p-7 & pr71631 execution failures), so no new test for
this bugfix.

Run through my tester (in conjunction with other ext-dce changes) on the
various cross targets.  Run individually through a bootstrap and regression
test cycle on x86_64 as well.

Pushing to the trunk.

PR rtl-optimization/115877
gcc/
* ext-dce.cc (ext_dce_process_uses): Restore the value of DST_MASK
for reach operand.
gcc/ext-dce.cc