From patchwork Thu Dec 21 20:10:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Andrew Pinski (QUIC)" X-Patchwork-Id: 182445 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp662225dyi; Thu, 21 Dec 2023 12:11:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHofJpZZU6SbvMnt1Ilg6n0Gt2oMV0sUfsOx0vOZpK5zniIbF2RLvohSXz33vuMJK9v5CAJ X-Received: by 2002:a05:6870:c69b:b0:204:9a7:5b36 with SMTP id cv27-20020a056870c69b00b0020409a75b36mr349957oab.14.1703189483126; Thu, 21 Dec 2023 12:11:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703189483; cv=pass; d=google.com; s=arc-20160816; b=cpl++pfVOmKbRNfhG+ty0RMJkyipDVIcb/IrOwiFIcmvH5w1U2c2KBDCDUOebEjbfO kxHkeX6UEmyzzTRdFZ9sWokBmqTJk8xPVkrU15FjHaG1perfgNuT1ue20ToOBN8QG+Xi XYU/Enk7emFhFmniEAqv/GuVR+8oPlqNBK3uy6PRH/ACXF0aOaRG9IC6WWdxu0d6j/Dz 6pkmQDTFoKIKCEhf7BufAyWyMBeYLT8ulMQW5C/HfexpKWnEvDWHge0gMV3CY0PKzsTW KRhcBK4206XmkiostOy4bx7zdzXQ5mHEWGJE63X3YY6Mnt4bCkNgGW0OxNhGG5efm8bY ZpEQ== 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-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=SHYGa+OQCqhEkmpCe1mdRNQdtxliqHe55HfPRRk/gw8=; fh=o3CEdS3yGN/eIa89Zn0Kf01WYLxTE9IjKuSQGVPeOHI=; b=UuokV+8JKNq92HjYqCkLz7V/wwJIFzk1E/OPLy0WBgWRoknKIXKpcCSeORR4ROK1ZK MPVzm5RQleZZy88vs3lto7syeTFYfWN0Ng82vqODC97C9r2ps24wiiGimPo4StAFN9f4 YxNXmaiuKF3f/P9d3sfQmJTJ/YMa4ZIpw64DdEhK8yVNNzIZTB9LZwgCbFa+UZh0F25O ae0mFXAl5buqIpgfZeqTRCnAwNO+vF+4yqphQraynGpZe9wn1OeKqnYEbv2bsLcaSvXA QgcTIwU+89umj2mCa/Lo6oSz48ep8nXElurOMYi4iFrzAG0KruzqTuJ5UJFrXHjiVTP3 giIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="pB/BZPon"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id g26-20020a67e29a000000b004668d5313ddsi542836vsf.186.2023.12.21.12.11.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 12:11:23 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="pB/BZPon"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C3084386F81E for ; Thu, 21 Dec 2023 20:11:22 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by sourceware.org (Postfix) with ESMTPS id A23213858C56 for ; Thu, 21 Dec 2023 20:10:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A23213858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=quicinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A23213858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703189460; cv=none; b=HStC5DZJpXQdiaYGE/5J54pwYaWxS6n0ZY91ZApN8KO0+BcU5uSgdFrZy5N5twqb2R9f25Fx19IsRtjl7GMvZMwmrgL55t3pAMXSKdUh5jkWu15Z5J/359/46gB4DHP6FiKRMvMHSfIRAhb1kl1SFfDcj262HThKTQhP3puO9v0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703189460; c=relaxed/simple; bh=nEAmDJcXJhjJ8OZla3AEFjFo0qj1NKpNy6aa4plUwBc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=cuLTFvHvcwSPROUKkTxdVs2aV7ekV+6ZkjFnUltelCE9T80gDlFj5xw43B6sse1MpSculuywEwCKhJL9gKYDQ93CH1mv6JNPugG9ul+iZO71yfkyxmPrRu9H4WwNSgUpdNCabpCwsrw3rwLWJ2zLl8IbUFJkVy5CcrJMZ704/Mw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BLCRMo3001670 for ; Thu, 21 Dec 2023 20:10:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=SHYGa+O QCqhEkmpCe1mdRNQdtxliqHe55HfPRRk/gw8=; b=pB/BZPonLoYme2SqF6UXIVO DLy1vaj+BOLOz7D0eLJQWIRBQ/hpFTbuTTvN92FFeGCVCOpPrUKAmYExgsr6BYtb sCaMlMMXcH+5hdDABShkvKx0QQ916tggWFKHKUSoLxklILeSAAC8NofE+XJ9T365 CzYt0oKKe3iIx6s8YIggM3HTtOiT+HH/We675FGDBnvcJtygDau50cjg+aTpScDQ 3EggRvgFiU9sBWk6m1Eb9JOG141h1T/EqIKlQX7I6kDMcnU6AoourO2aZ+wEejea GhACP2bpbGJ2IdrGViyGeRVXUyG971/oW3Htu0tIt1SuEAWHFtnXqiFVQ79r7Qg= = Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3v4d89k6j5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 21 Dec 2023 20:10:57 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BLKAuE9024640 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 21 Dec 2023 20:10:56 GMT Received: from hu-apinski-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 21 Dec 2023 12:10:56 -0800 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH] Document cond_copysign and cond_len_copysign optabs [PR112951] Date: Thu, 21 Dec 2023 12:10:41 -0800 Message-ID: <20231221201041.2709909-1-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: NnpuVC4FBoCjAfV0JUGJFdHpGYv_eJXk X-Proofpoint-ORIG-GUID: NnpuVC4FBoCjAfV0JUGJFdHpGYv_eJXk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=503 clxscore=1015 suspectscore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 adultscore=0 impostorscore=0 mlxscore=0 bulkscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312210154 X-Spam-Status: No, score=-13.4 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, 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: 1785923615647117598 X-GMAIL-MSGID: 1785923615647117598 This adds the documentation for cond_copysign and cond_len_copysign optabs. Also reorders the optabs.def to be in the similar order as how the internal function was done. gcc/ChangeLog: PR middle-end/112951 * doc/md.texi (cond_copysign): Document. (cond_len_copysign): Likewise. * optabs.def: Reorder cond_copysign to be before cond_fmin. Likewise for cond_len_copysign. Signed-off-by: Andrew Pinski --- gcc/doc/md.texi | 10 +++++++++- gcc/optabs.def | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 536ce997f01..030a9bf4c3d 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -7315,6 +7315,7 @@ form of @samp{@var{op}@var{mode}2}. @cindex @code{cond_smax@var{mode}} instruction pattern @cindex @code{cond_umin@var{mode}} instruction pattern @cindex @code{cond_umax@var{mode}} instruction pattern +@cindex @code{cond_copysign@var{mode}} instruction pattern @cindex @code{cond_fmin@var{mode}} instruction pattern @cindex @code{cond_fmax@var{mode}} instruction pattern @cindex @code{cond_ashl@var{mode}} instruction pattern @@ -7334,6 +7335,7 @@ form of @samp{@var{op}@var{mode}2}. @itemx @samp{cond_smax@var{mode}} @itemx @samp{cond_umin@var{mode}} @itemx @samp{cond_umax@var{mode}} +@itemx @samp{cond_copysign@var{mode}} @itemx @samp{cond_fmin@var{mode}} @itemx @samp{cond_fmax@var{mode}} @itemx @samp{cond_ashl@var{mode}} @@ -7371,6 +7373,8 @@ form of @samp{@var{op}@var{mode}3}. As an exception, the vector forms of shifts correspond to patterns like @code{vashl@var{mode}3} rather than patterns like @code{ashl@var{mode}3}. +@samp{cond_copysign@var{mode}} is only defined for floating point modes. + @cindex @code{cond_fma@var{mode}} instruction pattern @cindex @code{cond_fms@var{mode}} instruction pattern @cindex @code{cond_fnma@var{mode}} instruction pattern @@ -7432,6 +7436,7 @@ form of @samp{@var{op}@var{mode}2}. @cindex @code{cond_len_smax@var{mode}} instruction pattern @cindex @code{cond_len_umin@var{mode}} instruction pattern @cindex @code{cond_len_umax@var{mode}} instruction pattern +@cindex @code{cond_len_copysign@var{mode}} instruction pattern @cindex @code{cond_len_fmin@var{mode}} instruction pattern @cindex @code{cond_len_fmax@var{mode}} instruction pattern @cindex @code{cond_len_ashl@var{mode}} instruction pattern @@ -7451,6 +7456,7 @@ form of @samp{@var{op}@var{mode}2}. @itemx @samp{cond_len_smax@var{mode}} @itemx @samp{cond_len_umin@var{mode}} @itemx @samp{cond_len_umax@var{mode}} +@itemx @samp{cond_len_copysign@var{mode}} @itemx @samp{cond_len_fmin@var{mode}} @itemx @samp{cond_len_fmax@var{mode}} @itemx @samp{cond_len_ashl@var{mode}} @@ -7478,11 +7484,13 @@ integer if @var{m} is scalar, otherwise it has the mode returned by @code{TARGET_VECTORIZE_GET_MASK_MODE}. Operand 5 has whichever integer mode the target prefers. -@samp{cond_@var{op}@var{mode}} generally corresponds to a conditional +@samp{cond_len_@var{op}@var{mode}} generally corresponds to a conditional form of @samp{@var{op}@var{mode}3}. As an exception, the vector forms of shifts correspond to patterns like @code{vashl@var{mode}3} rather than patterns like @code{ashl@var{mode}3}. +@samp{cond_len_copysign@var{mode}} is only defined for floating point modes. + @cindex @code{cond_len_fma@var{mode}} instruction pattern @cindex @code{cond_len_fms@var{mode}} instruction pattern @cindex @code{cond_len_fnma@var{mode}} instruction pattern diff --git a/gcc/optabs.def b/gcc/optabs.def index 07c06ba8cbb..92acec73b3a 100644 --- a/gcc/optabs.def +++ b/gcc/optabs.def @@ -249,6 +249,7 @@ OPTAB_D (cond_smin_optab, "cond_smin$a") OPTAB_D (cond_smax_optab, "cond_smax$a") OPTAB_D (cond_umin_optab, "cond_umin$a") OPTAB_D (cond_umax_optab, "cond_umax$a") +OPTAB_D (cond_copysign_optab, "cond_copysign$F$a") OPTAB_D (cond_fmin_optab, "cond_fmin$a") OPTAB_D (cond_fmax_optab, "cond_fmax$a") OPTAB_D (cond_fma_optab, "cond_fma$a") @@ -256,7 +257,6 @@ OPTAB_D (cond_fms_optab, "cond_fms$a") OPTAB_D (cond_fnma_optab, "cond_fnma$a") OPTAB_D (cond_fnms_optab, "cond_fnms$a") OPTAB_D (cond_neg_optab, "cond_neg$a") -OPTAB_D (cond_copysign_optab, "cond_copysign$F$a") OPTAB_D (cond_one_cmpl_optab, "cond_one_cmpl$a") OPTAB_D (cond_len_add_optab, "cond_len_add$a") OPTAB_D (cond_len_sub_optab, "cond_len_sub$a") @@ -275,6 +275,7 @@ OPTAB_D (cond_len_smin_optab, "cond_len_smin$a") OPTAB_D (cond_len_smax_optab, "cond_len_smax$a") OPTAB_D (cond_len_umin_optab, "cond_len_umin$a") OPTAB_D (cond_len_umax_optab, "cond_len_umax$a") +OPTAB_D (cond_len_copysign_optab, "cond_len_copysign$F$a") OPTAB_D (cond_len_fmin_optab, "cond_len_fmin$a") OPTAB_D (cond_len_fmax_optab, "cond_len_fmax$a") OPTAB_D (cond_len_fma_optab, "cond_len_fma$a") @@ -282,7 +283,6 @@ OPTAB_D (cond_len_fms_optab, "cond_len_fms$a") OPTAB_D (cond_len_fnma_optab, "cond_len_fnma$a") OPTAB_D (cond_len_fnms_optab, "cond_len_fnms$a") OPTAB_D (cond_len_neg_optab, "cond_len_neg$a") -OPTAB_D (cond_len_copysign_optab, "cond_len_copysign$F$a") OPTAB_D (cond_len_one_cmpl_optab, "cond_len_one_cmpl$a") OPTAB_D (vcond_mask_len_optab, "vcond_mask_len_$a") OPTAB_D (cmov_optab, "cmov$a6")