From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id 265EE3858408 for ; Tue, 16 Apr 2024 07:09:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 265EE3858408 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 265EE3858408 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::229 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713251361; cv=none; b=IRqN2JD/VcuqMCv2py6wJrvATTxCBi6jA4m4P3Q4RXJuY+g+vO88O4lC6FiJSc7CK5ijCmdsPc5sZlkktz6a95lFH2tCSyKMB0kLE9r0lrRQYPkDX6Jxfdnui2Lh1uqusci6dRKuWq0fcLaJsrsypXHthfD1NDMfouFeC8d9sRQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713251361; c=relaxed/simple; bh=3x7zw+AL8XmGKXG69X1+3rjRVprdxLkgFg1AnRGnpt0=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=Y/tdPUrdw4Dcdvw2Mfk9dep8y8Ccabs7yyU/P0dAxPP2VBueqy8t41XObifTwt92STaKnWSstH1CO70kmvAU9luugyqCmd5I8m/wTeNEYHl/uY2ZCCzPayfyJ7Qb3WEuCCm6cs09rIptHztkkfIZMlPEKAHZLLB0iNtnvaNkZWo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2da84f93c99so18501941fa.1 for ; Tue, 16 Apr 2024 00:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713251349; x=1713856149; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dxwAoH7b6xvKlwk9O5b0mBPetwnniMMS8MfEJuzrIlE=; b=CBbTgXqcYdaXSkl+qcZHgFJzmUy2L+fI8d7av3IXFTlIZW23yppMNX1KedHLB8rBvN x91VB3xYeFwWToCFxmIYN1a9QbqVvP2uOjF2C1scw+UpZkvLGwIVB7agsXbZ+LlfNVvw G4GgXTwtUc+mFsE2JV6Ysfdi+gSCs/tbOr7JReSqUoQsPx9g+pqD6QJQnDXtXj+TfQ9f +VEz1UYztW0GTWKM7cKDPkYQ6m2votEk2Ce9ScdoVeRfKs7deX5iJjEI2wS7d5RVX0bN 87TErjcO0w+T/rh3s4iYIr/zUZLk8DI7CnYZIjJ9nGYaTRSYdSLTWJVBUmYro6LqRlJy B3kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713251349; x=1713856149; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dxwAoH7b6xvKlwk9O5b0mBPetwnniMMS8MfEJuzrIlE=; b=ah8HXBq/wVug1yWbBBfYbVRQKYqNgYJFcxD/2gdLkH6Z9ZIjm68u22jgQqeqXwPe0P gwxVGltkZilLlYZS+xstjUXWXpgKtD0E+5p5GQJ8DoGgZsr0LuTSMhEE7E6uKlvc5Fyr DeLaYVVYrAvUeckKGV/27WvryynyMDHXVGWks9arZM6dSDHfffXckVZcbQ0MfvHctONV 6hy63oz5va0mHrKY+3i4RL3B8iO5B6zmE/kJuw7sRq9faMbVb5NQXFaEOCoeOUtabYpk rP89jI3NhtnUMBPArWLO0AgNbpFklo56nmFPY1cIhX4RU0eB4anXhuSjYHvjG16Hgawm ejRQ== X-Gm-Message-State: AOJu0Yx6dnk18sjm7nr6Rko6yM3DLHaL1VgemZjUfWYXH4Px4gH7Xs9u rXxQ3M+Er/XysEAZW5ffiRrD2mYNddO8s5j7Fuu9sXQN9QS5Tvx3Jk+nwKXzF35Kq3suGRQCDA6 /pRoORdw/I89R3NiItZdkKpnKYz8= X-Google-Smtp-Source: AGHT+IEOT1Dw/MLR+s+wDnCn4cwz1NfNqAHKGlsyQB8GA4AqdM/1QCa4qhxkEsMTvJJ3VcZrrZfHgxcIlUmckHM1e2Y= X-Received: by 2002:a2e:9ed0:0:b0:2d8:a969:5e1 with SMTP id h16-20020a2e9ed0000000b002d8a96905e1mr9962969ljk.10.1713251349201; Tue, 16 Apr 2024 00:09:09 -0700 (PDT) MIME-Version: 1.0 References: <20240416002605.1585916-1-quic_apinski@quicinc.com> In-Reply-To: <20240416002605.1585916-1-quic_apinski@quicinc.com> From: Richard Biener Date: Tue, 16 Apr 2024 09:08:58 +0200 Message-ID: Subject: Re: [PATCH] Document that vector_size works with typedefs [PR92880] To: Andrew Pinski Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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 List-Id: On Tue, Apr 16, 2024 at 2:26=E2=80=AFAM Andrew Pinski wrote: > > 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? 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 (1= 6))); > @end smallexample > > @noindent > -The @code{int} type specifies the @dfn{base type}, while the attribute s= pecifies > -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 wid= e > +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 > -- > 2.43.0 >