[LRA]: Fix reg notes update

There is a typo in using dead_set instead of set in
clear_sparseset_regnos and regnos_in_sparseset_p.  This can result in
wrong unused (stalled) notes and wrong or worse code generation by
optimizations using unused notes after RA.

gcc/ChangeLog:

	* lra-lives.cc (clear_sparseset_regnos, regnos_in_sparseset_p):
	Use set instead of dead_set.
This commit is contained in:
Vladimir N. Makarov
2026-04-27 14:16:43 -04:00
parent 000144cf5c
commit 5dc2a8afda

View File

@@ -632,7 +632,7 @@ clear_sparseset_regnos (sparseset set, int regno, enum machine_mode mode)
{
if (regno >= FIRST_PSEUDO_REGISTER)
{
sparseset_clear_bit (dead_set, regno);
sparseset_clear_bit (set, regno);
return;
}
for (int last = end_hard_regno (mode, regno); regno < last; regno++)
@@ -645,7 +645,7 @@ static bool
regnos_in_sparseset_p (sparseset set, int regno, enum machine_mode mode)
{
if (regno >= FIRST_PSEUDO_REGISTER)
return sparseset_bit_p (dead_set, regno);
return sparseset_bit_p (set, regno);
for (int last = end_hard_regno (mode, regno); regno < last; regno++)
if (!sparseset_bit_p (set, regno))
return false;