From 07f62ed9a7b09951f83855e19d41641b098190b1 Mon Sep 17 00:00:00 2001 From: "Vladimir N. Makarov" Date: Mon, 20 Jan 2025 17:08:50 -0500 Subject: [PATCH] [PR118560][LRA]: Fix typo in checking secondary memory mode for the reg class 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/lra-constraints.cc b/gcc/lra-constraints.cc index cd19da294db..797222c9fbc 100644 --- a/gcc/lra-constraints.cc +++ b/gcc/lra-constraints.cc @@ -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 -- 2.47.2