]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PR118560][LRA]: Fix typo in checking secondary memory mode for the reg class
authorVladimir N. Makarov <vmakarov@redhat.com>
Mon, 20 Jan 2025 22:08:50 +0000 (17:08 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Mon, 20 Jan 2025 22:09:18 +0000 (17:09 -0500)
  The patch for PR118067 wrongly checked hard reg set subset.  It worked for
the equal sets as in PR118067.  But it was wrong in other cases as in
PR118560 (inordinate compile time).

gcc/ChangeLog:

PR target/118560
* lra-constraints.cc (invalid_mode_reg_p): Exchange args in
hard_reg_set_subset_p call.

gcc/lra-constraints.cc

index cd19da294db3bdce66f0758e8915e8820a6914cc..797222c9fbc26589c2d25f8fd111a75a7d78b570 100644 (file)
@@ -4138,8 +4138,8 @@ static bool invalid_mode_reg_p (enum machine_mode mode, rtx x)
   if (! REG_P (x))
     return false;
   enum reg_class rclass = get_reg_class (REGNO (x));
-  return hard_reg_set_subset_p (ira_prohibited_class_mode_regs[rclass][mode],
-                               reg_class_contents[rclass]);
+  return hard_reg_set_subset_p (reg_class_contents[rclass],
+                               ira_prohibited_class_mode_regs[rclass][mode]);
 }
 
 /* Main entry point of the constraint code: search the body of the