From patchwork Thu Oct 26 09:53:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "juzhe.zhong@rivai.ai" X-Patchwork-Id: 158476 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp549927vqb; Thu, 26 Oct 2023 02:54:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGllf4FwWgfyseM5vGPDyhI8SEBrfXBprLwKxma0VPQItiMFtxcNazcd/jLmCZh+tXbpau5 X-Received: by 2002:a05:620a:3710:b0:777:3da6:531a with SMTP id de16-20020a05620a371000b007773da6531amr20529498qkb.1.1698314063737; Thu, 26 Oct 2023 02:54:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698314063; cv=pass; d=google.com; s=arc-20160816; b=XQBPOzUp4feqPKl7qRePT2CYwRwE92Mcs/D7e+8hKx8qvKboXf59/PqsaKY+QHS+fP RL/mHjbjdtrh6ctuSKwVacyscNw6Nq6uiKGgZ/0rSIToQj8LcS4zEufcq63RHNyNS3+A vOhiEkGmUWT3/ZPRO93BTWKzOe8G+mzyXj4c01C1pirPiuSf/XPGF378VJS4kfSsY0PZ KZiwgCFOAxwbFnl+ZxRwjfwD4XjAzRtm+cM9ErDwXBut43qU9pe6jc3wv6j0IQxTjKrG h5iiDFqya9iuABcJBWI6xotxTlrKr0Zx3jjcJdxxWfKaiGyjgww2Nhfzan5q8FU2MYnP OBXg== 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:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:arc-filter:dmarc-filter:delivered-to; bh=CIGx7lUK21AHlz4Lt2G5/++c3zdXv389RNttT0GDMLk=; fh=Hxj0cw/2jAkyitv6gv3v4BQlApRvZwleU4172JThTNQ=; b=aWs64FMpcSvfH4t1rOH7EswMtJmYvOSYCrhKbeRWnclHknYFffjuGZgK95qdRcN6/d /ZCqui8AJGJUZbA2D/pQI0YN7fz8f5blgqJNE8Fd+zcBZahCaMC+S7feXt98bVC756p3 dj10I3jb6saBNHVvxM2XZ6CvNdHwYCOjuwyV7fHjCt6FuQnIs9PdRINg8RNvPWQUoRvU 2/utWE/2FuQ/ahAJP8kQ2k3EvAW+CY39QaeTFvIThy3zqWsFMOtnmeC/dOd2QkEwzR/K PBzrNG/OyVqC9D6SI1M2dwo2a3SpY/yV9oQZC9G5a1RxYShJP20xc5zDxXJBpfTxf67g fEpA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id w8-20020a05620a094800b00770f73d1d6fsi8810212qkw.222.2023.10.26.02.54.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 02:54:23 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 743103858281 for ; Thu, 26 Oct 2023 09:54:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbgbr1.qq.com (smtpbgbr1.qq.com [54.207.19.206]) by sourceware.org (Postfix) with ESMTPS id C24F83858D20 for ; Thu, 26 Oct 2023 09:53:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C24F83858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C24F83858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=54.207.19.206 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698314041; cv=none; b=Zdz4VuIMDw/FcF7bZZc5G5bBE8AkPhrQdNddjPZuwufWFq33xf/4V5bAQmGXd3ahRuAmpyYYN2pGMvUPXm0zi/5ZHGpKTutcaI7wkJG0Xthr67YVQoKAAkt1AkMhgsrjuBJgMQbUhJsoneoJFG91AP/BuRlFNLbqefhu7h2jpC4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698314041; c=relaxed/simple; bh=53BTKPxANfVf3Hmwqs434zO3KTNjucGUI1QQMFbOU5M=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=hEmOYV63YgjFOcnIWshI1kw1TJbql4/9xCKzIYsrirQFOOz8yrbjT9pg2DyU3uvTCLsSKDZsskfCmLgZZCjTnUMvdVtAlgwniohMMBxkJBWzbeC2cAbXs8hi58VNTQMmJsrd6c0KbKM28iyimlwQDYTf+qKDn8gFrzhnQmi5cMw= ARC-Authentication-Results: i=1; server2.sourceware.org X-QQ-mid: bizesmtp86t1698314028tywg1edp Received: from rios-cad121.hadoop.rioslab.org ( [58.60.1.9]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 26 Oct 2023 17:53:47 +0800 (CST) X-QQ-SSF: 01400000000000G0V000000A0000000 X-QQ-FEAT: BJh8VuJn7fIDyn7EoMmEnXD25zlKe3T8pbqY5tIySOeiO/QRNV3bxHUF50f9z MIhQJdUp4tS4keqjK684qjJHgjq+s3fXkbjywMflTm4TBFdvjnuSP247NecD0WNw3mBimfS uNv37Qvn4iKy5tUuRgHKdlswpQxWKr0hlk4xdsRo7Jh0ZPm5siOztT+Aa6t3amY9U67/vqQ 64ntM37BtcExYC5Tc6O6cSEJW9K6EDMyKnB3RKok0JQ8yoS3p5eSlRsciiLWfTBe7sfPmqg Co0I/A6Unev46Z4k1XA6atsHXXtboMJRtT4RRinRXancZhkzf1lNGqgR0Pg3fvysXDoyUpw chGAHueDQaVi6CBBqs3RmOoWCwbMqXMk7VOdUXRgpGrrak9Gt3/o31/b+T2ovJ+M4h0M3pg X-QQ-GoodBg: 2 X-BIZMAIL-ID: 15685350096491014724 From: Juzhe-Zhong To: gcc-patches@gcc.gnu.org Cc: richard.sandiford@arm.com, rguenther@suse.de, Juzhe-Zhong Subject: [PATCH V2] DOC: Update COND_LEN document Date: Thu, 26 Oct 2023 17:53:46 +0800 Message-Id: <20231026095346.3190168-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz7a-one-0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780788070018470843 X-GMAIL-MSGID: 1780811367469055730 gcc/ChangeLog: * doc/md.texi: Adapt COND_LEN pseudo code. --- gcc/doc/md.texi | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index daa318ee3da..fab2513105a 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -7341,8 +7341,10 @@ store the result in operand 0, otherwise store operand 2 in operand 0. The operation only works for the operands are vectors. @smallexample -for (i = 0; i < ops[4] + ops[5]; i++) - op0[i] = op1[i] ? @var{op} op2[i] : op3[i]; +for (i = 0; i < GET_MODE_NUNITS (@var{m}); i++) + op0[i] = (i < ops[4] + ops[5] && op1[i] + ? @var{op} op2[i] + : op3[i]); @end smallexample where, for example, @var{op} is @code{~} for @samp{cond_len_one_cmpl@var{mode}}. @@ -7403,8 +7405,10 @@ store the result in operand 0, otherwise store operand 4 in operand 0. The operation only works for the operands are vectors. @smallexample -for (i = 0; i < ops[5] + ops[6]; i++) - op0[i] = op1[i] ? op2[i] @var{op} op3[i] : op4[i]; +for (i = 0; i < GET_MODE_NUNITS (@var{m}); i++) + op0[i] = (i < ops[5] + ops[6] && op1[i] + ? op2[i] @var{op} op3[i] + : op4[i]); @end smallexample where, for example, @var{op} is @code{+} for @samp{cond_len_add@var{mode}}. @@ -7436,8 +7440,10 @@ takes 3 operands rather than two. For example, the vector form of @samp{cond_len_fma@var{mode}} is equivalent to: @smallexample -for (i = 0; i < ops[6] + ops[7]; i++) - op0[i] = op1[i] ? fma (op2[i], op3[i], op4[i]) : op5[i]; +for (i = 0; i < GET_MODE_NUNITS (@var{m}); i++) + op0[i] = (i < ops[6] + ops[7] && op1[i] + ? fma (op2[i], op3[i], op4[i]) + : op5[i]); @end smallexample @cindex @code{neg@var{mode}cc} instruction pattern