From patchwork Thu Jan 25 19:47:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 192286 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp215705dyb; Thu, 25 Jan 2024 11:48:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IH7DKEQhwgAE53bAgmQA7uW0aNmDdedidcw1D2qqJvGGRQEpdCQe8scaTdTLcgzT3nJWttQ X-Received: by 2002:a05:6830:1e85:b0:6e0:cb4e:b634 with SMTP id n5-20020a0568301e8500b006e0cb4eb634mr293032otr.72.1706212118121; Thu, 25 Jan 2024 11:48:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706212118; cv=pass; d=google.com; s=arc-20160816; b=LPQEoeSr3W975CO3gNkknakpo+8E4WGYVr6Jsk+A/tjoyWPG1gmQH0xK1tWqVkXe4H 6yn0mi91bQmD87sWsWtUfCkS7WlM4f59XjtbaBXaiDsR1XNvZ8QGQku3dnJDKn52u725 wnVktpIt0ThEXsjnvpvC9djtlnrQ5DQZCRVYuk2cAzvRo0Uf+CzWkngkNCP6zwMTv6qi Aa7PoC0rmZ703cjIfwnjB/6trEt9YzMrE/b3xDFzr+pJtOYSGNiBHgw4LTLJryvbQ4wh AJdbAZKonx4iOTrMNBxeaZ1cW7dtwuqBbzZjZtudgerEqJpkKjFvJs8o5GVC0zcAb1XK szaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-language:subject:from :to:user-agent:mime-version:date:message-id:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=SHoxGju2uJmeA0AswY+TroUfQgM+NWPUxyx7GhF9XKs=; fh=XNn3asQvIblazGK92GBt13dVv+YmGV3pBS0JC29ZQco=; b=dCf7t6BXVktkvVfrYEe7cHX//Wsn1DWO+T1ddl6v7x9unYRcsTSii6Z1ndmANUeuzp GrfiEAqyOeVb3lgCvfJ72v29V0tD0uWqCbBpzr5EjjDHZ4pmt5qivCXwGRj5EfADyARW CAnL+8wTrKIIPYjv2BPtq5B6g/gNYQ6CxM50+u2WOoigpvLOq/VeBSwV41cVe90T/zMP f84ZU3KlKnIqIrGaZvWmgm6dCje/6akSwcyusU9lrLxkNuUKB+nkdG0BWr3deEp0UCnS QFARh8KU5tAGb1x2xNKpEFBshLC4OTfWriemu41Dgx53Poz7Z2gw9RI9vnRSCayv2spX D2kA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="H7X/1RIN"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id c17-20020ac85a91000000b0042a666969aesi3016056qtc.556.2024.01.25.11.48.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 11:48:38 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="H7X/1RIN"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C9852385829D for ; Thu, 25 Jan 2024 19:48:37 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id CE6F43858C98 for ; Thu, 25 Jan 2024 19:47:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CE6F43858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CE6F43858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706212071; cv=none; b=bO3yZPEuZDHS4h2JXeB8AbVu1YMCw4/ibfmcjusdSJyEMYkfiJZeIDfy0r8uzB2C5l2piPV+t33fKbW3NVdRFQn/TmCmvXRV+Xw0NoSlxNjAOGQg1dHjfORSEttjWz6vp7scjj/C4B/50k1XRq2KKdh18Jq93hTvupKM9PrY1iA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706212071; c=relaxed/simple; bh=9rvW+QJFkWrfJhp8KTOzakWM8kUuE/XLa3p/bmtxkuY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject; b=mgaWNL+2DDKOhJlL3yMObFgyXp4qkWyW+1AFA2BIL7frxWhJJ1pt9EPKzTeqqPkSRQg84QWz7xAqjzG7wMVou8Bj7OzXvh3LmRvVOAlZs0d/nCx0sqql90jHIdzmZL6C/h6Dha90XdN+5rdYXfpcvk46uwyr5dH4pmb4QKo0Wo0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706212069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=SHoxGju2uJmeA0AswY+TroUfQgM+NWPUxyx7GhF9XKs=; b=H7X/1RINXAaTMsblBgpMiBl8+fpBl7KO2O8hbgUbGotu9BBcKPAACg+qtZ5+lglNSTnoMJ 64IjQFXWAQmP12Ax/npQhUwVegLE7Vy6gaWdepa5swj7BSfhjOAYa0E3gOdGImubh99K6Y oHMmKiM2/VnwDTEJRrtoPfP2GS+jKG0= Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-361--BjYNf5dNeGehfG85D4MAQ-1; Thu, 25 Jan 2024 14:47:47 -0500 X-MC-Unique: -BjYNf5dNeGehfG85D4MAQ-1 Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-5eb6dba1796so110386147b3.1 for ; Thu, 25 Jan 2024 11:47:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706212066; x=1706816866; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=z6ADe9BaOFPGjB7slxD+wYrZnLqcNUbaJvyJAynYAhM=; b=NsS3x/8/sVVKlTSSmEjP3f2RjfEBj1fUOgOppLBF19U1Wj13E3F0jOPVcOm6iZznTk BaWuZndk8n3MgHloJv9++EFbNOnfxGVd3xdjmwLRpxSyuuhsE3/9MWg7+6dJLMkuovPb DMIXHOM3vmAUSvgGKWczI2i+n3dV79IE1eI0Dwp+HIxA9zsTjcZSGo8Hy4JAbzkXMuCA DTivuEtoVlA63HAuXw54nuh5DqtwfAdq3qn5S/yprdBkXWNmacYSziUvU6wOpPS/oxTG qqZA8ymmZROK7Rr+ESgWglhipPkEi4fCaWurCNyuREURLmgZ7EJrbskheFQ2GCrlGapO clJQ== X-Gm-Message-State: AOJu0YzPk8p9kZdpdXc2cK7nL2VG4uoTPAfcmMmMfwlS+Lrw6E2zppxI 1BTbBWbxQxJC2HPS3m4LspE5QF3+7THunsS4DQJKllsh1XkHyiV3yeSa9e986bSs68sTbyT6jcV sMdBg4nxKDfTjG+EN50ect2/ggwWUVKVipP98B9kYoJWsqf+uuCJ4getu2UIIiMVI33n86AdutV FkAiLfdGA4u9rEQnlp4xYBDBj3AKp2gVbZw2qgQ+g= X-Received: by 2002:a05:6902:18c6:b0:dc2:66ab:4bc0 with SMTP id ck6-20020a05690218c600b00dc266ab4bc0mr391981ybb.36.1706212066545; Thu, 25 Jan 2024 11:47:46 -0800 (PST) X-Received: by 2002:a05:6902:18c6:b0:dc2:66ab:4bc0 with SMTP id ck6-20020a05690218c600b00dc266ab4bc0mr391968ybb.36.1706212066108; Thu, 25 Jan 2024 11:47:46 -0800 (PST) Received: from [192.168.1.88] (23-233-12-249.cpe.pppoe.ca. [23.233.12.249]) by smtp.gmail.com with ESMTPSA id o4-20020a056214180400b006819636ba87sm5769899qvw.7.2024.01.25.11.47.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jan 2024 11:47:45 -0800 (PST) Message-ID: <3ffb5278-64a4-884f-1b57-665bd73b5f9b@redhat.com> Date: Thu, 25 Jan 2024 14:47:44 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 To: "gcc-patches@gcc.gnu.org" From: Vladimir Makarov Subject: [pushed][PR113526][LRA]: Fixing asm-flag-1.c failure on ARM X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789093077905243311 X-GMAIL-MSGID: 1789093077905243311 The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113526 The patch was successfully bootstrapped and tested on x86-64, ppc64le, and aarch64. commit 5c617df410602d0e51d61c84d1ae7e9b3f51efa4 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 --git a/gcc/lra-constraints.cc b/gcc/lra-constraints.cc index 3379b88ff22..0ae81c1ff9c 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