public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/81778] libgomp.c/for-5.c failure on nvptx -- illegal memory access Date: Thu, 01 Oct 2020 23:28:18 +0000 [thread overview] Message-ID: <bug-81778-4-vvH415hIYC@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-81778-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81778 --- Comment #10 from Tom de Vries <vries at gcc dot gnu.org> --- Tentative patch: ... diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c index 99cb4f9dda4..034de497390 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -6333,6 +6333,8 @@ expand_omp_simd (struct omp_region *region, struct omp_for_data *fd) /* Collapsed loops not handled for SIMT yet: limit to one lane only. */ if (fd->collapse > 1) simt_maxlane = build_one_cst (unsigned_type_node); + else if (TREE_CODE (fd->loops[0].step) != INTEGER_CST) + simt_maxlane = build_one_cst (unsigned_type_node); else if (safelen_int < omp_max_simt_vf ()) simt_maxlane = build_int_cst (unsigned_type_node, safelen_int); tree vf @@ -6636,6 +6638,10 @@ expand_omp_simd (struct omp_region *region, struct omp_for_data *fd) else t = fold_build2 (PLUS_EXPR, type, fd->loop.v, step); expand_omp_build_assign (&gsi, fd->loop.v, t); + /* The alternative IV needs to to be updated as well, but isn't + currently. Assert that we fall back to simt_maxlane == 1. */ + gcc_assert (altv == NULL_TREE + || tree_int_cst_equal (simt_maxlane, integer_one_node)); } /* Remove GIMPLE_OMP_RETURN. */ ...
next prev parent reply other threads:[~2020-10-01 23:28 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-81778-4@http.gcc.gnu.org/bugzilla/> 2020-09-25 8:54 ` burnus at gcc dot gnu.org 2020-10-01 13:36 ` vries at gcc dot gnu.org 2020-10-01 23:28 ` vries at gcc dot gnu.org [this message] 2020-10-02 15:05 ` burnus at gcc dot gnu.org 2021-04-29 12:40 ` vries at gcc dot gnu.org
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=bug-81778-4-vvH415hIYC@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).