aboutsummaryrefslogtreecommitdiff
path: root/gcc/d
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2022-03-02 14:13:06 -0300
committerAlexandre Oliva <oliva@gnu.org>2022-03-02 14:13:06 -0300
commit12f8dc0b642db5edc702f252af1a5231606b29db (patch)
tree76ed9d7ed0b6eeedaacac523fa0a609a569e4328 /gcc/d
parentdbaabd06aaf4a1b0f2a20671c39148a0bd6ccf0e (diff)
downloadgcc-12f8dc0b642db5edc702f252af1a5231606b29db.zip
gcc-12f8dc0b642db5edc702f252af1a5231606b29db.tar.gz
gcc-12f8dc0b642db5edc702f252af1a5231606b29db.tar.bz2
Undo multi-word optional reloads correctly
Unlike e.g. remove_inheritance_pseudos, undo_optional_reloads didn't deal with subregs, so instead of removing multi-word moves, it replaced the reload pseudo with the original pseudo. Besides the redundant move, that retained the clobber of the dest, that starts a multi-word move. After the remap, the sequence that should have become a no-op move starts by clobbering the original pseudo and then moving its pieces onto themselves. The problem is the clobber: it makes earlier sets of the original pseudo to be regarded as dead: if the optional reload sequence was an output reload, the insn for which the output reload was attempted may be regarded as dead and deleted. I've arranged for undo_optional_reloads to accept SUBREGs and use get_regno, like remove_inheritance_pseudo, adjusted its insn-removal loop to tolerate iterating over a removed clobber, and added logic to catch any left-over reload clobbers that could trigger the problem. for gcc/ChangeLog * lra-constraints.cc (undo_optional_reloads): Recognize and drop insns of multi-word move sequences, tolerate removal iteration on an already-removed clobber, and refuse to substitute original pseudos into clobbers.
Diffstat (limited to 'gcc/d')
0 files changed, 0 insertions, 0 deletions