Previously, HandleLastUse would delete RegRef information for sub-registers if they were dead even if their corresponding super-register were still live. If the super-register were later renamed, then the definitions of the sub-register would not be updated appropriately. This patch alters the behavior so that RegInfo information for sub-registers is only deleted when the sub-register and super-register are both dead. This resolves PR26775. This is the mirror image of Hal's r227311 commit.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM, thanks! -- Nice efficient patch :-) [I realize that I'm ruining that somewhat by asking for a comment ;) ]
../llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp | ||
---|---|---|
315 ↗ | (On Diff #51557) | Please add a comment here explaining why we do this only if the superregister was not live. Maybe something like this: // Note that we only do this if the superregister was not live because otherwise, regardless whether we have an explicit use of the subregister, the subregister's contents are needed for the uses of the superregister. |
Comment Actions
This is also a fix for 25503 which is important for mesa/llvmpipe on
ppc64le. I know some IBMers would like this to be fixed for 3.8.1.