]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR123922, LRA]: Fix asan related bug in LRA
authorVladimir N. Makarov <vmakarov@redhat.com>
Wed, 4 Feb 2026 20:46:22 +0000 (15:46 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Wed, 4 Feb 2026 20:49:01 +0000 (15:49 -0500)
commit7653fb4e9b8e8a1c434d706b44b99d1e399e308e
tree1390c649ca6479a11205d6b2894a4ccd07e88500
parent7c6cb40a44498991ed93d3dd19d128105e8b64b8
[PR123922, LRA]: Fix asan related bug in LRA

LRA rarely splits hard reg live ranges to assign regs to pseudos when
other possibility to allocate regs failed.  During the pseudo
assignment LRA updates hard reg preferences of pseudos connected to
given pseudo through copies.  For this LRA uses array
update_hard_regno_preference_check which was not allocated during hard
reg live range splitting.  The patch fixes the bug by allocation of
the array during hard reg live range splitting.

gcc/ChangeLog:

PR rtl-optimization/123922
* lra-assigns.cc (lra_split_hard_reg_for): Allocate and free
update_hard_regno_preference_check.  Clear non_reload_pseudos for
successful spilling too.
gcc/lra-assigns.cc