From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1012) id ED9143858D37; Thu, 25 Jan 2024 19:46:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED9143858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706212015; bh=YLDO82rjMt+/IKq1+SHkPc7xBPjzLIijsaf3WozTWq4=; h=From:To:Subject:Date:From; b=DQfdcSGRMmXTg+3QhBNesDXsXn6TeiA6gnkb58DA/z1TV34rdcEfkPmw0V46ZJ/gT +t9FvLzANSPizFn0c9LjD31qFptQL63vC+vu3cVgST5dKyLb3rpGkMEHwE2VjHL8OF +5notBlG10OjRq5qJiR/LmxVleq5Ouw0bezMGyFo= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Vladimir Makarov To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8435] [PR113526][LRA]: Fixing asm-flag-1.c failure on ARM X-Act-Checkin: gcc X-Git-Author: Vladimir N. Makarov X-Git-Refname: refs/heads/master X-Git-Oldrev: ffeab69e1ffc0405da3a9222c7b9f7a000252702 X-Git-Newrev: 476226290dba8cd7f3e9f4e3f0185b58903db8cd Message-Id: <20240125194655.ED9143858D37@sourceware.org> Date: Thu, 25 Jan 2024 19:46:55 +0000 (GMT) List-Id: https://gcc.gnu.org/g:476226290dba8cd7f3e9f4e3f0185b58903db8cd commit r14-8435-g476226290dba8cd7f3e9f4e3f0185b58903db8cd Author: Vladimir N. Makarov Date: Thu Jan 25 14:41:17 2024 -0500 [PR113526][LRA]: Fixing asm-flag-1.c failure on ARM My recent patch for PR113356 results in failure asm-flag-1.c test on arm. After the patch LRA treats asm operand pseudos as general regs. There are too many such operands and LRA can not assign hard regs to all operand pseudos. Actually we should not assign hard regs to the operand pseudo at all. The following patch fixes this. gcc/ChangeLog: PR target/113526 * lra-constraints.cc (curr_insn_transform): Change class even for spilled pseudo successfully matched with with NO_REGS. Diff: --- 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 3379b88ff22e..0ae81c1ff9cb 100644 --- a/gcc/lra-constraints.cc +++ b/gcc/lra-constraints.cc @@ -4498,10 +4498,10 @@ curr_insn_transform (bool check_only_p) registers for other pseudos referenced in the insn. The most common case of this is a scratch register which will be transformed to scratch back at the end of LRA. */ - && lra_get_regno_hard_regno (regno) >= 0 && bitmap_single_bit_set_p (&lra_reg_info[regno].insn_bitmap)) { - lra_change_class (regno, NO_REGS, " Change to", true); + if (lra_get_allocno_class (regno) != NO_REGS) + lra_change_class (regno, NO_REGS, " Change to", true); reg_renumber[regno] = -1; } /* We can do an optional reload. If the pseudo got a hard