From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 5C5D9385EC4E for ; Mon, 14 Mar 2022 14:03:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5C5D9385EC4E Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-633-gOcEjtzhO4aEgvdlcdP7Ug-1; Mon, 14 Mar 2022 10:03:24 -0400 X-MC-Unique: gOcEjtzhO4aEgvdlcdP7Ug-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C62472999B46; Mon, 14 Mar 2022 14:03:23 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8775C4087D76; Mon, 14 Mar 2022 14:03:23 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 22EE3Kjr302343 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 14 Mar 2022 15:03:21 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 22EE3Kpc302342; Mon, 14 Mar 2022 15:03:20 +0100 Date: Mon, 14 Mar 2022 15:03:20 +0100 From: Jakub Jelinek To: "H.J. Lu" Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] x86: Ignore OPTION_MASK_ISA_64BIT for -m32 when inlining Message-ID: Reply-To: Jakub Jelinek References: <20220314134901.1252090-1-hjl.tools@gmail.com> MIME-Version: 1.0 In-Reply-To: <20220314134901.1252090-1-hjl.tools@gmail.com> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-10.5 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, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2022 14:03:27 -0000 On Mon, Mar 14, 2022 at 06:49:01AM -0700, H.J. Lu via Gcc-patches wrote: > gcc/ > > PR target/104890 > * config/i386/i386.cc (ix86_can_inline_p): Ignore > OPTION_MASK_ISA_64BIT for -m32. > > gcc/testsuite/ > > PR target/104890 > * gcc.target/i386/pr104890.c: New test. > --- > gcc/config/i386/i386.cc | 4 ++++ > gcc/testsuite/gcc.target/i386/pr104890.c | 11 +++++++++++ > 2 files changed, 15 insertions(+) > create mode 100644 gcc/testsuite/gcc.target/i386/pr104890.c > > diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc > index 23bedea92bd..f2bb4765e5b 100644 > --- a/gcc/config/i386/i386.cc > +++ b/gcc/config/i386/i386.cc > @@ -587,6 +587,10 @@ ix86_can_inline_p (tree caller, tree callee) > if (TARGET_GENERAL_REGS_ONLY_P (callee_opts->x_ix86_target_flags)) > always_inline_safe_mask |= MASK_80387; > > + /* Ignore OPTION_MASK_ISA_64BIT for -m32. */ > + if (!TARGET_64BIT) > + always_inline_safe_mask |= OPTION_MASK_ISA_64BIT; This looks wrong. (1 << 1) in alwyas_inline_safe_mask and *->x_target_flags is MASK_80387, not OPTION_MASK_ISA_64BIT. Jakub