public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/114653] New: Not vectoring the loop with openmp reduction.
@ 2024-04-09  9:53 kugan at gcc dot gnu.org
  2024-04-09 12:53 ` [Bug middle-end/114653] Not vectorizing " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: kugan at gcc dot gnu.org @ 2024-04-09  9:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114653
           Summary: Not vectoring the loop with openmp reduction.
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kugan at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57910
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57910&action=edit
testcase

Main loop in the attached test case is not vectorized with -fopenmp. It gets
vectorized with -fopenmp-simd.

In the case of -fopenmp reduction variables lax,lay,laz gets assigned to an
array. data reference calculation for this seem to fail. See:

        offset from base address: (ssizetype) ((sizetype) _20 * 4)
        constant offset from base address: 0
        step: 0
        base alignment: 16
        base misalignment: 0
        offset alignment: 4
        step alignment: 128
        base_object: D.4806[_20]
Creating dr for D.4808[_20]
analyze_innermost: Applying pattern match.pd:219, generic-match-1.cc:3190
test.cpp:37:9: missed:  failed: evolution of offset is not affine.


command used: 
 test.cpp -Ofast -fopenmp -mcpu=neoverse-v2


gcc -v:
Using built-in specs.
COLLECT_GCC=/home/kvivekananda/install/bin/gcc
COLLECT_LTO_WRAPPER=/home/kvivekananda/install/libexec/gcc/aarch64-unknown-linux-gnu/14.0.1/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ../gcc/configure --enable-multiarch=yes
--enable-languages=c,c++,fortran,lto --disable-bootstrap
--prefix=/home/kvivekananda/install
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240314 (experimental) (GCC)

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

end of thread, other threads:[~2024-04-10  6:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-09  9:53 [Bug middle-end/114653] New: Not vectoring the loop with openmp reduction kugan at gcc dot gnu.org
2024-04-09 12:53 ` [Bug middle-end/114653] Not vectorizing " rguenth at gcc dot gnu.org
2024-04-10  3:55 ` kugan at gcc dot gnu.org
2024-04-10  3:58 ` kugan at gcc dot gnu.org
2024-04-10  5:05 ` kugan at gcc dot gnu.org
2024-04-10  6:48 ` kugan at gcc dot gnu.org
2024-04-10  6:53 ` kugan 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).