public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/100232] New: [OpenMP][nvptx] Reduction fails with optimization and 'loop'/'for simd' but not with 'for'
@ 2021-04-23 13:20 burnus at gcc dot gnu.org
  2021-04-23 14:19 ` [Bug target/100232] " vries at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-04-23 13:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100232

            Bug ID: 100232
           Summary: [OpenMP][nvptx] Reduction fails with optimization and
                    'loop'/'for simd' but not with 'for'
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: openmp, wrong-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: vries at gcc dot gnu.org
  Target Milestone: ---
            Target: nvptx-none

Created attachment 50661
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50661&action=edit
Testcase: gcc -fopenmp -O1 (fails, -O0 works)  - to be run with nvptx
offloading

(Based on https://github.com/SOLLVE/sollve_vv/ 's
tests/5.0/loop/test_loop_reduction_{and,or}_device.c )

The code works with nvptx offloading with -O0 but fails with -O1 and higher.
(It also works on AMD GCN or with host fallback.)

A reduction of  result &&= 1  will yield 0 instead of the expected 1.

I note that it works with 'for' but fails with 'loop' and 'for simd', hence, I
think it might related to SIMT (→ some other PRs about SIMT).

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-04-29  9:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 13:20 [Bug target/100232] New: [OpenMP][nvptx] Reduction fails with optimization and 'loop'/'for simd' but not with 'for' burnus at gcc dot gnu.org
2021-04-23 14:19 ` [Bug target/100232] " vries at gcc dot gnu.org
2021-04-23 15:27 ` burnus at gcc dot gnu.org
2021-04-28 12:51 ` vries at gcc dot gnu.org
2021-04-28 13:03 ` vries at gcc dot gnu.org
2021-04-28 14:31 ` vries at gcc dot gnu.org
2021-04-29  7:55 ` cvs-commit at gcc dot gnu.org
2021-04-29  8:40 ` cvs-commit at gcc dot gnu.org
2021-04-29  9:08 ` vries at gcc dot gnu.org

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).