public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/98563] [10/11 Regression] vectorization fails while it worked on gcc 9 and earlier
Date: Thu, 07 Jan 2021 08:24:35 +0000	[thread overview]
Message-ID: <bug-98563-4-e3f9Htgrak@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98563-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.3
             Status|UNCONFIRMED                 |NEW
             Target|                            |x86_64-*-* i?86-*-*
           Keywords|                            |missed-optimization, openmp
            Summary|regression: vectorization   |[10/11 Regression]
                   |fails while it worked on    |vectorization fails while
                   |gcc 9 and earlier           |it worked on gcc 9 and
                   |                            |earlier
           Priority|P3                          |P2
                 CC|                            |jakub at gcc dot gnu.org
             Blocks|                            |53947
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-01-07

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the issue is that GCC 9 was able to vectorize the loop while GCC 10 and
trunk are not but those vectorize the basic block (where there's only enough
data to use SSE).

> g++-10 t.C -march=skylake-avx512 -O3 -fopenmp-simd -fdump-tree-vect-details -S -fopt-info-vec
t.C:4:6: optimized: basic block part vectorized using 32 byte vectors
> g++-9 t.C -march=skylake-avx512 -O3 -fopenmp-simd -fdump-tree-vect-details -S -fopt-info-vec
t.C:8:26: optimized: loop vectorized using 32 byte vectors

the reason it fails is


Creating dr for REALPART_EXPR <D.49590[_13]._M_value>
analyze_innermost: t.C:4:6: missed:  failed: evolution of offset is not affine.
        base_address:
        offset from base address:
        constant offset from base address:
        step:
        base alignment: 0
        base misalignment: 0
        offset alignment: 0
        step alignment: 0
        base_object: D.49590
        Access function 0: 0
        Access function 1: 0
        Access function 2: scev_not_known;

where this is

  _13 = .GOMP_SIMD_LANE (simduid.0_12(D), 0);
  REALPART_EXPR <D.49590[_13]._M_value> = _26;
  IMAGPART_EXPR <D.49590[_13]._M_value> = _7;
  _20 = REALPART_EXPR <MEM <struct complex[64]> [(const struct complex
&)&D.49590][_13]._M_value>;

I'm not sure why this is here with GCC 10+ but not GCC 9.

Jakub?


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

  parent reply	other threads:[~2021-01-07  8:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06 14:53 [Bug tree-optimization/98563] New: regression: " nathanael.schaeffer at gmail dot com
2021-01-06 15:04 ` [Bug tree-optimization/98563] " nathanael.schaeffer at gmail dot com
2021-01-07  8:24 ` rguenth at gcc dot gnu.org [this message]
2021-01-07  8:34 ` [Bug tree-optimization/98563] [10/11 Regression] " nathanael.schaeffer at gmail dot com
2021-01-07 15:42 ` [Bug tree-optimization/98563] [10/11 Regression] vectorization fails while it worked on gcc 9 and earlier since since r10-2271-gd81ab49d0586fca0 marxin at gcc dot gnu.org
2021-01-25 12:58 ` jakub at gcc dot gnu.org
2021-01-26 12:11 ` rguenth at gcc dot gnu.org
2021-01-26 12:48 ` jakub at gcc dot gnu.org
2021-01-26 13:24 ` rguenth at gcc dot gnu.org
2021-01-26 13:34 ` jakub at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-06-28 10:43 ` [Bug tree-optimization/98563] [10/11/12/13 " jakub at gcc dot gnu.org
2023-07-07 10:38 ` [Bug tree-optimization/98563] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-02-21  4:27 ` pinskia 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-98563-4-e3f9Htgrak@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: 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).