From patchwork Wed Jan 5 22:34:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 1575886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=yAfHJ0Qc; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JTkpg1ShPz9sSs for ; Thu, 6 Jan 2022 09:35:53 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A7AB8385803A for ; Wed, 5 Jan 2022 22:35:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7AB8385803A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1641422151; bh=H2S6pHc7pjNfYfJM0kdynmBOP5Y0p9yUWOz7rNb0bVg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=yAfHJ0QcXORDIKlyKdo83qDvwpos1wbUx/IBg/37e9Ad4U6J8HHI4AWKITgM7LPR1 1RS6mWbWR43kewG+VD+X5pNSWSDQtqpZCu4EJ6o/gkpa3s+3jBRhMcuC7eCGJjMXTF AQfbwBGva0zDpU9ssXYVxWQYDkhP5CF8p/4qazig= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by sourceware.org (Postfix) with ESMTPS id 508833858031 for ; Wed, 5 Jan 2022 22:35:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 508833858031 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 205FSJoF029767 for ; Wed, 5 Jan 2022 14:35:10 -0800 Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3dd7xjq77v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 05 Jan 2022 14:35:09 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 5 Jan 2022 14:35:07 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 5 Jan 2022 14:35:07 -0800 Received: from linux.wrightpinski.org.com (unknown [10.69.242.198]) by maili.marvell.com (Postfix) with ESMTP id B47205B6937; Wed, 5 Jan 2022 14:35:07 -0800 (PST) To: Subject: [PATCH] Fix target/103910: missing GTY on x86_mfence causing PCH usage to ICE Date: Wed, 5 Jan 2022 14:34:59 -0800 Message-ID: <1641422099-15559-1-git-send-email-apinski@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: vSphWNLx_Uv_8Y8eVgZEGqqeU50Px3Hr X-Proofpoint-GUID: vSphWNLx_Uv_8Y8eVgZEGqqeU50Px3Hr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-05_08,2022-01-04_01,2021-12-02_01 X-Spam-Status: No, score=-14.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP 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-Patchwork-Original-From: apinski--- via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: apinski@marvell.com Cc: Andrew Pinski Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Andrew Pinski With -O3 -march=opteron, a mfence builtin is added after the loop to say the nontemporal stores are no longer needed. This all good without precompiled headers as the function decl that is referneced by x86_mfence is referenced in another variable but with precompiled headers, x86_mfence is all messed up and the decl was GC'ed away. This fixes the problem by marking x86_mfence as GTY to save/restore during precompiled headers just like most other variables in the header file. Committed as obvious after a bootstrap/test on x86_64-linux-gnu. gcc/ChangeLog: PR target/103910 * config/i386/i386.h (x86_mfence): Mark with GTY. --- gcc/config/i386/i386.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index f027608eefa..3ac0f698ae2 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -486,7 +486,7 @@ extern unsigned char ix86_prefetch_sse; /* Fence to use after loop using storent. */ -extern tree x86_mfence; +extern GTY(()) tree x86_mfence; #define FENCE_FOLLOWING_MOVNT x86_mfence /* Once GDB has been enhanced to deal with functions without frame