From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Andrew Stubbs <ams@codesourcery.com>
Cc: Jakub Jelinek <jakub@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 1/3] omp-simd-clone: Allow fixed-lane vectors
Date: Tue, 30 Aug 2022 18:54:49 +0200 [thread overview]
Message-ID: <yddmtbl659i.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <290f72ce-e997-0a8c-f11b-cd64edb0859c@codesourcery.com> (Andrew Stubbs's message of "Tue, 30 Aug 2022 15:52:34 +0100")
Hi Andrew,
> On 26/08/2022 12:04, Jakub Jelinek wrote:
>>> gcc/ChangeLog:
>>>
>>> * doc/tm.texi: Regenerate.
>>> * omp-simd-clone.cc (simd_clone_adjust_return_type): Allow zero
>>> vecsize.
>>> (simd_clone_adjust_argument_types): Likewise.
>>> * target.def (compute_vecsize_and_simdlen): Document the new
>>> vecsize_int and vecsize_float semantics.
>> LGTM, except for a formatting nit.
> diff --git a/gcc/omp-simd-clone.cc b/gcc/omp-simd-clone.cc
> index 58bd68b129b..68ee4c2c3b0 100644
> --- a/gcc/omp-simd-clone.cc
> +++ b/gcc/omp-simd-clone.cc
> @@ -504,7 +504,10 @@ simd_clone_adjust_return_type (struct cgraph_node *node)
> veclen = node->simdclone->vecsize_int;
> else
> veclen = node->simdclone->vecsize_float;
> - veclen = exact_div (veclen, GET_MODE_BITSIZE (SCALAR_TYPE_MODE (t)));
> + if (known_eq (veclen, 0))
> + veclen = node->simdclone->simdlen;
> + else
> + veclen = exact_div (veclen, GET_MODE_BITSIZE (SCALAR_TYPE_MODE (t)));
> if (multiple_p (veclen, node->simdclone->simdlen))
> veclen = node->simdclone->simdlen;
> if (POINTER_TYPE_P (t))
this broke bootstrap on (at least) i386-pc-solaris2.11 and
sparc-sun-solaris2.11:
In file included from /vol/gcc/src/hg/master/local/gcc/coretypes.h:475,
from /vol/gcc/src/hg/master/local/gcc/omp-simd-clone.cc:23:
/vol/gcc/src/hg/master/local/gcc/poly-int.h: In instantiation of 'typename if_nonpoly<Cb, bool>::type maybe_ne(const poly_int_pod<N, C>&, const Cb&) [with unsigned int N = 1; Ca = long long unsigned int; Cb = int; typename if_nonpoly<Cb, bool>::type = bool]':
/vol/gcc/src/hg/master/local/gcc/omp-simd-clone.cc:507:7: required from here
/vol/gcc/src/hg/master/local/gcc/poly-int.h:1295:22: error: comparison of integer expressions of different signedness: 'const long long unsigned int' and 'const int' [-Werror=sign-compare]
1295 | return a.coeffs[0] != b;
| ~~~~~~~~~~~~^~~~
Changing the three instances of 0 to 0U seems to fix this.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
next prev parent reply other threads:[~2022-08-30 16:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 13:23 [PATCH 0/3] OpenMP SIMD routines Andrew Stubbs
2022-08-09 13:23 ` [PATCH 1/3] omp-simd-clone: Allow fixed-lane vectors Andrew Stubbs
2022-08-26 11:04 ` Jakub Jelinek
2022-08-30 14:52 ` Andrew Stubbs
2022-08-30 16:54 ` Rainer Orth [this message]
2022-08-31 7:11 ` Martin Liška
2022-08-31 8:29 ` Jakub Jelinek
2022-08-31 8:35 ` Andrew Stubbs
2022-08-09 13:23 ` [PATCH 2/3] amdgcn: OpenMP SIMD routine support Andrew Stubbs
2022-08-30 14:53 ` Andrew Stubbs
2022-08-09 13:23 ` [PATCH 3/3] vect: inbranch SIMD clones Andrew Stubbs
2022-09-09 14:31 ` Jakub Jelinek
2022-09-14 8:09 ` Richard Biener
2022-09-14 8:34 ` Jakub Jelinek
2022-11-30 15:17 ` Andrew Stubbs
2022-11-30 15:37 ` Jakub Jelinek
2022-12-01 13:35 ` Andrew Stubbs
2022-12-01 14:16 ` Jakub Jelinek
2023-01-06 12:20 ` Andrew Stubbs
2023-02-10 9:11 ` Jakub Jelinek
2023-02-23 10:02 ` Andrew Stubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yddmtbl659i.fsf@CeBiTec.Uni-Bielefeld.DE \
--to=ro@cebitec.uni-bielefeld.de \
--cc=ams@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).