From patchwork Wed May 8 05:36:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 1932787 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=r36czeRi; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4VZ3nD4Bl7z214K for ; Wed, 8 May 2024 15:37:20 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC9C33858417 for ; Wed, 8 May 2024 05:37:18 +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 E73F43858D1E for ; Wed, 8 May 2024 05:36:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E73F43858D1E 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 E73F43858D1E 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=1715146619; cv=none; b=b+w22OzACFBbiLciN4g6qgD9/3wgDYpt8EGtQNMhQyNX/rxvlXBeKn1BuPTn/fQBuFCJzdMNkAfdJ2OWE729LbICWpF0tSiAgOJWT6OCVLGhp32XyUJdQKNzFXA+myTG33Q6qqZMnuOhtOS3EFOs57AE/9pOqUORhwThHic5hq0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715146619; c=relaxed/simple; bh=N2Dvs0AyN6IO42kpPa4xR+5vEiihH8UWn6H8j0tF8wo=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=LUthllRsXaPn639q0vttAY1ErxPy54+aAQPLEUtzfG2yV2uBFQWAO6w2fWFnoImBYxxmR5ziGrq5DH1s7uQNAvFvxjw3nJU0rNmT8TM6tJgFgjmoJid+kvc2Rzr0IhxFkad3mRamfmBHxGDQz4ZYf/vdaGihCJyPKHJ9kPpQK/o= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4485LQGb006382; Wed, 8 May 2024 05:36:57 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=mHWQSEVvuYRQLseoA0DO2yVf72ZAu3xGsx5L7ET0HM4=; b=r36czeRiVR2hzkiQDJAJy6HimTTfyU10Uo6hMmk/v96s9XHUYrO0SZ/R+jJG3CFil0PW cPG8bnhIhsBkIk6wHm1M/Do8GzedvtGTKR3xp6Hk6pQtnci45b0MedbW7/AvTZtEABrR Wdc/3pITFhlWDm83bQ7iFbitaiy/EdHO14XrhLjxXbcx2LxapMfhSUdoyIJ97yqCn5hl 9Zh2b3Vvvs5b19swpLqqd6LBJNWdewF4VcTulInwxv0FjPwvTLBwtBTLExWeuwBfFFdn L/3lpFylGWKbf3BgNi5hPbZj0i6ngakXX0Bm6MuPiasglEFxyL+lwRYa22pOWZElzWi2 aQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3y02p982gv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 May 2024 05:36:57 +0000 Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4485auF8029103; Wed, 8 May 2024 05:36:56 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 3y02p982g5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 May 2024 05:36:56 +0000 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 4484UPPQ009733; Wed, 8 May 2024 05:36:23 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xyshujvyu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 May 2024 05:36:23 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 4485aINa22741286 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 May 2024 05:36:20 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 362812004D; Wed, 8 May 2024 05:36:18 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E59D22004B; Wed, 8 May 2024 05:36:14 +0000 (GMT) Received: from [9.200.57.36] (unknown [9.200.57.36]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 8 May 2024 05:36:14 +0000 (GMT) Message-ID: Date: Wed, 8 May 2024 13:36:13 +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 4/4] tree: Remove KFmode workaround [PR112993] Content-Language: en-US From: "Kewen.Lin" To: GCC Patches Cc: Jakub Jelinek , Segher Boessenkool , Peter Bergner , Michael Meissner , David Edelsohn , "Joseph S. Myers" References: <813e8433-0428-1854-c82c-fc0743368fa8@linux.ibm.com> In-Reply-To: <813e8433-0428-1854-c82c-fc0743368fa8@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: adEtJcg7DOM-R7NxcSsfECftni4Z8YVS X-Proofpoint-ORIG-GUID: xbfgvcsUDcmFIHrZEtyZF47rZCYnU_21 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-08_02,2024-05-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 mlxlogscore=973 spamscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405080040 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, 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 makes KFmode have 128 bit mode precision, we don't need this workaround to fix up the type precision any more, and just go with mode precision. So this patch is to remove KFmode workaround. Bootstrapped and regress-tested on: - powerpc64-linux-gnu P8/P9 (with ibm128 by default) - powerpc64le-linux-gnu P9/P10 (with ibm128 by default) - powerpc64le-linux-gnu P9 (with ieee128 by default) Is it OK for trunk if {1,2}/4 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));