]> git.ipfire.org Git - thirdparty/gcc.git/commit
regrename: Handle MEM segments
authorAndrew Stubbs <ams@baylibre.com>
Wed, 1 Jul 2026 14:36:55 +0000 (14:36 +0000)
committerAndrew Stubbs <ams@baylibre.com>
Wed, 15 Jul 2026 11:15:49 +0000 (11:15 +0000)
commitcfc8ba7fa91eb7bf12fb7cd01542ddee2c337fb0
treebb83940f13208b42802e3e611d3ddda768c8467a
parentf139530a10bbb3c422ec30e1603899428ca5183c
regrename: Handle MEM segments

This patch fixes the register rename pass to allow for MEM that have "segment"
elements in the address.

rtl.h and rtanal.h allow MEM addresses to have the format "segment + base +
offset", where "segment" is an arbitrary UNSPEC.  Without the patch, regrename
misidentifies the base and can break 64-bit addresses, on targets with 32-bit
registers, by placing the high-part in a non-contiguous register.

gcc/ChangeLog:

* regrename.cc (scan_rtx_address): Recurse for segment UNSPECs.
gcc/regrename.cc