From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B7F9A3858410; Sat, 9 Oct 2021 04:54:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7F9A3858410 From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/102659] New: [false diagnosis] extra warning info after O2 vectorization for gcc.dg/torture/pr69760.c Date: Sat, 09 Oct 2021 04:54:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget Message-ID: 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: Sat, 09 Oct 2021 04:54:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102659 Bug ID: 102659 Summary: [false diagnosis] extra warning info after O2 vectorization for gcc.dg/torture/pr69760.c Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: crazylht at gmail dot com Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-*-* i?86-*-* options: ../gcc/xgcc -B ../gcc -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects ../../../gcc/intel-innersource/O2_vectorization/gcc/testsuite/gcc.dg/tortur= e/pr69760.c -m32 -march=3Dcascadelake ../../../gcc/intel-innersource/O2_vectorization/gcc/testsuite/gcc.dg/tortur= e/pr69760.c: In function =E2=80=98test_func=E2=80=99: ../../../gcc/intel-innersource/O2_vectorization/gcc/testsuite/gcc.dg/tortur= e/pr69760.c:16:10: warning: iteration 54 invokes undefined behavior [-Waggressive-loop-optimizations] 16 | a[L * k] =3D 0.0; | ^ ../../../gcc/intel-innersource/O2_vectorization/gcc/testsuite/gcc.dg/tortur= e/pr69760.c:12:17: note: within this loop 12 | for (i =3D 0; i < N; i++) | ^ dump is quite the same as adding -fno-tree-vectorize @@ -6,44 +6,44 @@ Removing basic block 8 __attribute__((noclone, noinline)) void test_func (double * a, int L, int m, int n, int N) { + unsigned int ivtmp.9; unsigned int ivtmp.8; - unsigned int ivtmp.7; - unsigned int _14; - int _26; - unsigned int _31; - unsigned int _32; - double * _33; - unsigned int _34; - unsigned int _38; - void * _39; + unsigned int _4; + unsigned int _5; + double * _6; + unsigned int _7; + unsigned int _25; + unsigned int _26; + int _27; + void * _40; [local count: 118111600]: - _26 =3D -m_13(D); - ivtmp.7_1 =3D (unsigned int) _26; - _31 =3D (unsigned int) m_13(D); - _32 =3D _31 * 4214967296; - _33 =3D a_17(D) + _32; - ivtmp.8_30 =3D (unsigned int) _33; - _34 =3D (unsigned int) a_17(D); - _14 =3D _34 + 1935228928; - _38 =3D _14 + _32; + _27 =3D -m_13(D); + ivtmp.8_8 =3D (unsigned int) _27; + _4 =3D (unsigned int) m_13(D); + _5 =3D _4 * 4214967296; + _6 =3D a_17(D) + _5; + ivtmp.9_21 =3D (unsigned int) _6; + _7 =3D (unsigned int) a_17(D); + _26 =3D _7 + 1935228928; + _25 =3D _5 + _26; [local count: 955630225]: - # ivtmp.7_3 =3D PHI - # ivtmp.8_28 =3D PHI - if (ivtmp.7_3 <=3D 3) + # ivtmp.8_3 =3D PHI + # ivtmp.9_24 =3D PHI + if (ivtmp.8_3 <=3D 3) goto ; [50.00%] else goto ; [50.00%] [local count: 477815112]: - _39 =3D (void *) ivtmp.8_28; - MEM[(double *)_39] =3D 0.0; + _40 =3D (void *) ivtmp.9_24; + MEM[(double *)_40] =3D 0.0; [local count: 955630225]: - ivtmp.7_2 =3D ivtmp.7_3 + 1; - ivtmp.8_29 =3D ivtmp.8_28 + 80000000; - if (ivtmp.8_29 !=3D _38) + ivtmp.8_38 =3D ivtmp.8_3 + 1; + ivtmp.9_14 =3D ivtmp.9_24 + 80000000; + if (ivtmp.9_14 !=3D _25) goto ; [87.64%] else goto ; [12.36%]=