public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Kwok Yeung <kcy@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-11] Fix vector handling for firstprivate of <= pointer size Date: Thu, 13 May 2021 16:13:40 +0000 (GMT) [thread overview] Message-ID: <20210513161340.BD5BB3A3E416@sourceware.org> (raw) https://gcc.gnu.org/g:ee2bcf1934bf78a509ac32632118ab20fcc2d6aa commit ee2bcf1934bf78a509ac32632118ab20fcc2d6aa Author: Tobias Burnus <tobias@codesourcery.com> Date: Fri Mar 6 16:24:52 2020 +0100 Fix vector handling for firstprivate of <= pointer size Test case is the existing libgomp.oacc-c++/firstprivate-mappings-1.C. * omp-low.c (convert_from_firstprivate_int): Use VIEW_CONVERT also for vectors. Diff: --- gcc/ChangeLog.omp | 5 +++++ gcc/omp-low.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index e2876b6aa34..b9fb82e39d8 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -1,3 +1,8 @@ +2020-02-06 Tobias Burnus <tobias@codesourcery.com> + + * omp-low.c (convert_from_firstprivate_int): + Use VIEW_CONVERT also for vectors. + 2020-02-20 Kwok Cheung Yeung <kcy@codesourcery.com> * omp-general.c (oacc_verify_routine_clauses): Handle diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 1e509b36d62..9b1d5e3763d 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -12270,7 +12270,8 @@ convert_from_firstprivate_int (tree var, tree orig_type, bool is_ref, { tree_code code = NOP_EXPR; - if (TREE_CODE (type) == REAL_TYPE || TREE_CODE (type) == COMPLEX_TYPE) + if (TREE_CODE (type) == REAL_TYPE || TREE_CODE (type) == COMPLEX_TYPE + || VECTOR_TYPE_P (type)) code = VIEW_CONVERT_EXPR; if (code == VIEW_CONVERT_EXPR
reply other threads:[~2021-05-13 16:13 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210513161340.BD5BB3A3E416@sourceware.org \ --to=kcy@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /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: linkBe 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).