From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 93ED2398200B; Fri, 2 Jul 2021 11:41:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93ED2398200B From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/100778] [11 Regression] Get SIGFPE on simple test with -fpe-trap=invalid and SLP vectorization ON, with gfortran 11.1.0 on x86_64 Date: Fri, 02 Jul 2021 11:41:00 +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: 11.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: Fri, 02 Jul 2021 11:41:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100778 --- Comment #12 from rguenther at suse dot de --- On Fri, 2 Jul 2021, gabrielle.hugo at cern dot ch wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100778 >=20 > --- Comment #11 from Gabrielle Hugo --- > Awesome, thanks a lot Richard! >=20 >=20 > Applying your patch in tree-vect-slp.c to gcc 11, I now get the vectorized > division divpd after the if as expected: >=20 > if (norm .gt. 1.D+00) then > 400826: 76 7b jbe 4008a3 > 400828: 66 0f 28 d0 movapd %xmm0,%xmm2 > x =3D x / norm > y =3D y / norm > write (*, '(A,F5.3)') 'Normalized x and y.', norm > 40082c: 48 8b 05 c5 01 00 00 mov 0x1c5(%rip),%rax # = 4009f8 > > 400833: 48 8d 6c 24 10 lea 0x10(%rsp),%rbp > 400838: 48 c7 44 24 18 78 09 movq $0x400978,0x18(%rsp) > 40083f: 40 00=20 > 400841: 66 0f 14 d2 unpcklpd %xmm2,%xmm2 > 400845: 48 89 ef mov %rbp,%rdi > 400848: c7 44 24 20 1d 00 00 movl $0x1d,0x20(%rsp) > 40084f: 00=20 > x =3D x / norm > 400850: 66 0f 5e ca divpd %xmm2,%xmm1 >=20 >=20 > So if I understand correctly the fix in SLP vectorization=20 > (is_a (vinfo)),=20 > when there are possibly trapping operations=20 > (gimple_could_trap_p (stmt_info->stmt)),=20 > is to explicitely constrain them to come from the same BB=20 > (special handling when gimple_bb (last_stmt) !=3D gimple_bb (stmt_info->s= tmt) ). Yes. > Do I understand correctly that trunk is basically gcc 12.0, which will > eventually end up being released as gcc 12.1 ? Yes. > What about gcc 11, will this fix also make its way to the next gcc 11 rel= ease? Yes, we're usually waiting a bit to see if fallout is detected by autotesters before backporting to release branches.=