From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F9B0396D836; Thu, 7 Jan 2021 08:24:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F9B0396D836 From: "rguenth at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: missed-optimization, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: target_milestone bug_status cf_gcctarget keywords short_desc priority cc blocked everconfirmed cf_reconfirmed_on Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2021 08:24:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98563 Richard Biener 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 --- 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=3Dskylake-avx512 -O3 -fopenmp-simd -fdump-tree-vect-det= ails -S -fopt-info-vec t.C:4:6: optimized: basic block part vectorized using 32 byte vectors > g++-9 t.C -march=3Dskylake-avx512 -O3 -fopenmp-simd -fdump-tree-vect-deta= ils -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 analyze_innermost: t.C:4:6: missed: failed: evolution of offset is not aff= ine. 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 =3D .GOMP_SIMD_LANE (simduid.0_12(D), 0); REALPART_EXPR =3D _26; IMAGPART_EXPR =3D _7; _20 =3D REALPART_EXPR [(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=3D53947 [Bug 53947] [meta-bug] vectorizer missed-optimizations=