This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
regcprop and REG_DEAD
- From: Paul Koning <paul_koning at dell dot com>
- To: GCC List <gcc at gcc dot gnu dot org>
- Date: Fri, 13 May 2011 16:42:30 -0400
- Subject: regcprop and REG_DEAD
In attempting to find out what's wrong in PR 48990 (wrong code for MIPS N32 -O1) it looks to me like the issue is that a register is marked dead, then still used afterwards. This causes the delay slot fill logic to make a wrong decision (it brings a load instruction that overwrites the "dead" register into the delay slot from the branch-taken path, even though the fallthrough path still needs the original register value).
The register rewrite in question is made in regcprop.
Question: that code doesn't appear to touch REG_DEAD notes at all. Is that right? From the definition of REG_DEAD, it seems that rewriting a later insns to use register x means that a preceding (REG_DEAD x) needs to be deleted. Or moved to the later insn, perhaps.
paul