From patchwork Tue Apr 16 00:26:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1923938 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=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=g9HSXQVX; 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 4VJPwx1PWlz1yZ2 for ; Tue, 16 Apr 2024 10:26:39 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 819A63858CDA for ; Tue, 16 Apr 2024 00:26:37 +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 272633858D32 for ; Tue, 16 Apr 2024 00:26:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 272633858D32 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 272633858D32 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=1713227180; cv=none; b=QYtcQsqu1qivrqYeI2jKLxn8+oqwnuHQzvtJtTm+zRuXWz1a2MR4c1YL1hdkW1QP7a3edt9vypDxIjk+sSf1hrdyDhRDOq99aGEXGG3O+iifD/5HLDLN6KT8LSBY+036PClLIefA6wPrPbw7IlkH0Pdz8zQcJ7eFC8XjhcCQAeo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713227180; c=relaxed/simple; bh=7Wlr2WT3bUspdvRtt9tuuafVm0ZRBKo8qz7DpWKPnVs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=aB/18KcsNJgAFq8goFo2eY3pokvLjWkqje34SMdct24t+/LMSclcIfEnucOlrSiK6sYoxMtvbdrcZTqQpFof1qprTfsWdUFqB4cCTGziYFLToazPObvi+iF3s3Cg8i/4901mpwidH0F8wvJJxuAQAFBGtiQcKO/gbxg50NBdG60= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43G0LEhM013011 for ; Tue, 16 Apr 2024 00:26:17 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=pAokkwn jffYfV0cKzJbYxLFPS1Aq/3XgzJ09yewh47o=; b=g9HSXQVXCuzFxd+rvKcPxut artkMcI563caj4YuHV9QQ7Ylu2Ny6tvhVPxBn0EWq/nlYRJ33hzKqFs/4ShPOKZK EIudWTHsJw24cvAkV+fUq0FtaDbuga7v+XC7Xr0f5OD8M7ZT8ydcqFnS9PS8G+Hn hl1TWc29Y5QOSUdlLNT3QwNsrfhg2k5t3iuWhoURpEQ3H9/3EEA3LuTAEyIf/N0E iKp40Y761hmcyXu5InFDxbrJpnFJRKEg59GTSh9fBqn9wlLISN66OQQimqXD2A6r UuGnc85D9bkA4V145O7Qu2krM3rrb60AU3ro5o5CLI0spkJWtGce5KpbRnFen+Q= = Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xh7t1rvcv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 16 Apr 2024 00:26:16 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43G0QFPr015203 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 16 Apr 2024 00:26:16 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.1544.9; Mon, 15 Apr 2024 17:26:15 -0700 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH] Document that vector_size works with typedefs [PR92880] Date: Mon, 15 Apr 2024 17:26:05 -0700 Message-ID: <20240416002605.1585916-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: nalasex01b.na.qualcomm.com (10.47.209.197) 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-ORIG-GUID: 3p7aAASKSamv7z4cQAYvlvICkpVcBrbq X-Proofpoint-GUID: 3p7aAASKSamv7z4cQAYvlvICkpVcBrbq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-15_20,2024-04-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 phishscore=0 bulkscore=0 mlxlogscore=568 priorityscore=1501 spamscore=0 malwarescore=0 lowpriorityscore=0 adultscore=0 mlxscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404160000 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 This just adds a clause to make it more obvious that the vector_size attribute extension works with typedefs. Note this whole section needs a rewrite to be a similar format as other extensions. But that is for another day. OK? gcc/ChangeLog: PR c/92880 * doc/extend.texi (Using Vector Instructions): Add that the base_types could be a typedef of them. Signed-off-by: Andrew Pinski --- gcc/doc/extend.texi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 7b54a241a7b..e290265d68d 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -12901,12 +12901,13 @@ typedef int v4si __attribute__ ((vector_size (16))); @end smallexample @noindent -The @code{int} type specifies the @dfn{base type}, while the attribute specifies -the vector size for the variable, measured in bytes. For example, the -declaration above causes the compiler to set the mode for the @code{v4si} -type to be 16 bytes wide and divided into @code{int} sized units. For -a 32-bit @code{int} this means a vector of 4 units of 4 bytes, and the -corresponding mode of @code{foo} is @acronym{V4SI}. +The @code{int} type specifies the @dfn{base type} (which can be a +@code{typedef}), while the attribute specifies the vector size for the +variable, measured in bytes. For example, the declaration above causes +the compiler to set the mode for the @code{v4si} type to be 16 bytes wide +and divided into @code{int} sized units. For a 32-bit @code{int} this +means a vector of 4 units of 4 bytes, and the corresponding mode of +@code{foo} is @acronym{V4SI}. The @code{vector_size} attribute is only applicable to integral and floating scalars, although arrays, pointers, and function return values