]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PR117248][LRA]: Fix calculation of conflict hard regs of pseudo
authorVladimir N. Makarov <vmakarov@redhat.com>
Wed, 18 Dec 2024 19:00:38 +0000 (14:00 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Wed, 18 Dec 2024 19:33:12 +0000 (14:33 -0500)
The 1st patch for PR117248 resulted in PR117299 (libgo failures on arm).  So this is a patch
solving the problem in another way.

gcc/ChangeLog:

PR rtl-optimization/117248
* lra-lives.cc (process_bb_lives): Update conflict hard regs even
when clobber hard reg is not marked as dead.

gcc/lra-lives.cc

index 510f7d927ab0f680fd40088155d293572206aa38..94cb000bc5a13412751fc0a66cb240c8b49e4123 100644 (file)
@@ -1006,7 +1006,15 @@ process_bb_lives (basic_block bb, int &curr_point, bool dead_insn_p)
                                                      clobbered_regset))
                break;
            if (reg2 == NULL)
-             make_hard_regno_dead (reg->regno);
+             {
+               make_hard_regno_dead (reg->regno);
+             }
+           else
+             {
+               EXECUTE_IF_SET_IN_SPARSESET (pseudos_live, j)
+                 SET_HARD_REG_BIT (lra_reg_info[j].conflict_hard_regs,
+                                   reg->regno);
+             }
          }
 
       /* Increment the current program point if we must.  */