From patchwork Thu Jul 4 08:26:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 1956722 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=Wk78fCyl; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WF8tF66Gkz1xqb for ; Thu, 4 Jul 2024 18:28:21 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0DD2E384A4AD for ; Thu, 4 Jul 2024 08:28:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 1BCB73858288 for ; Thu, 4 Jul 2024 08:27:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1BCB73858288 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1BCB73858288 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720081633; cv=none; b=Qk0lunzwFiDq7Xkf0Kk1qGLd4bnvOnjFfVcjJ3jAjYQlUhZ41n1lNsNE4/h21n1fQ39TlUU3ZwS0Gnqb5wdy+vZFKmmsJK3UZO/3MVl6pHXhohcas11h6PDbgTY0bBfbyVeb0WJc3FpQ1kfYgkGXy9y0kvbg6IUxN26GUhmkVNY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720081633; c=relaxed/simple; bh=sXJzReQmEQ9BPsEO0MqSu5e9z+trgz0hV/Q/DTTWquk=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=TlarCUp0vJ4XrjnnK61wC6C+HCG7D+nn6sXQmwRzZWD8et8FUe6UFvi3L2IHWw8OtmBQdsvLwRjdFe9QBBym+uHL66NplhtaD7d2F0+XF2YmmuPL5qVY8PK3EZ5EvN259NQQ7bAGQ8WnpwR8RH5+oGYob8AYKMixToBJi4StJAY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4647SeGR025726; Thu, 4 Jul 2024 08:27:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h= message-id:date:mime-version:subject:from:to:cc:references :in-reply-to:content-type:content-transfer-encoding; s=pp1; bh=6 9DsayXzNk/3RcSRfDO8tOO7Iy6yGJLpvpGkhkkoHHw=; b=Wk78fCylD0MaB9ANE DcNJWKC//mTFHwK9yJN2JtnBtRD56OyhAuFzFa+nosRUQVrl38kv41Xt3iFzY/1P A5I1+RqQ4H5DhKYxT4TeszwvM5dZqJAwmfYC5ktvI0CTkSHq2GKGvLk1NcMm+o2e 5QSGzYJo3PjUhU6Un0z54pHU6r/ejtNfzzMzK4StOOiRjKAqU502PTIc3el2PZtd CiRaL6nkc3Eik2wVdi1//eFBE+osnpwbEeqOx8u4B6Tz65qLhAP9QY8LGNytlv3k zEemCAn9iCE7q+Ay/AUOblG6LL4VO6TWURmOMZv7fZU1kMt+RHOEDg5kyAp6Kmu0 94FXA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 405qch051v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Jul 2024 08:27:08 +0000 (GMT) Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 4648R71B020421; Thu, 4 Jul 2024 08:27:08 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 405qch051p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Jul 2024 08:27:07 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 4646smDm006164; Thu, 4 Jul 2024 08:27:07 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 402vkufd17-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Jul 2024 08:27:07 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 4648R1Db48431524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 4 Jul 2024 08:27:03 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B5A7720043; Thu, 4 Jul 2024 08:27:01 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 705AA20040; Thu, 4 Jul 2024 08:26:59 +0000 (GMT) Received: from [9.200.158.244] (unknown [9.200.158.244]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 4 Jul 2024 08:26:59 +0000 (GMT) Message-ID: Date: Thu, 4 Jul 2024 16:26:58 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: [PATCH 3/3] tree: Remove KFmode workaround [PR112993] Content-Language: en-US From: "Kewen.Lin" To: GCC Patches Cc: "Joseph S. Myers" , Richard Biener , Richard Sandiford , Jakub Jelinek , Segher Boessenkool , Peter Bergner References: In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: aWwQviuN-2tg-ovH5T0TisEtv7ldLMUr X-Proofpoint-GUID: jSjCd62g8qr6ammjO8JYg4cqujbLoV9W X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-03_18,2024-07-03_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=906 malwarescore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 suspectscore=0 bulkscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2406140001 definitions=main-2407040058 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP 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~incoming=patchwork.ozlabs.org@gcc.gnu.org Hi, The fix for PR112993 will make KFmode have 128 bit mode precision, we don't need this workaround to fix up the type precision any more, and just go with the mode precision. So this patch is to remove KFmode workaround. Bootstrapped and regtested on x86_64-redhat-linux, powerpc64{,le}-linux-gnu (ibm128 long double default) and powerpc64le-linux-gnu (ieee128 long double default). Is it OK for trunk if {1,2}/3 in this series get landed? BR, Kewen ----- PR target/112993 gcc/ChangeLog: * tree.cc (build_common_tree_nodes): Drop the workaround for rs6000 KFmode precision adjustment. --- gcc/tree.cc | 9 --------- 1 file changed, 9 deletions(-) -- 2.39.1 diff --git a/gcc/tree.cc b/gcc/tree.cc index f801712c9dd..f730981ec8b 100644 --- a/gcc/tree.cc +++ b/gcc/tree.cc @@ -9575,15 +9575,6 @@ build_common_tree_nodes (bool signed_char) if (!targetm.floatn_mode (n, extended).exists (&mode)) continue; int precision = GET_MODE_PRECISION (mode); - /* Work around the rs6000 KFmode having precision 113 not - 128. */ - const struct real_format *fmt = REAL_MODE_FORMAT (mode); - gcc_assert (fmt->b == 2 && fmt->emin + fmt->emax == 3); - int min_precision = fmt->p + ceil_log2 (fmt->emax - fmt->emin); - if (!extended) - gcc_assert (min_precision == n); - if (precision < min_precision) - precision = min_precision; FLOATN_NX_TYPE_NODE (i) = make_node (REAL_TYPE); TYPE_PRECISION (FLOATN_NX_TYPE_NODE (i)) = precision; layout_type (FLOATN_NX_TYPE_NODE (i));