From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A41D73857C69; Wed, 9 Dec 2020 11:26:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A41D73857C69 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/98211] [11 Regression] Wrong code at -O3 since r11-4482-gb626b00823af9ca9 Date: Wed, 09 Dec 2020 11:26:27 +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.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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: Wed, 09 Dec 2020 11:26:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98211 --- Comment #4 from Richard Biener --- GIMPLE testcase for the vectorization (w/o driver part). If you make the condition non-uniform then we include the _28 SLP def in the SLP and everything goes correct. So it might be that we need to special-case "external bools", but I thought we pattern those as !=3D 0 - guess we elide that when we see the BIT_IOR_EXPR use (but that would assume we vectorize that part as well). int test_var_3; short arr_20[16]; int testa[1024]; void __GIMPLE (ssa,startwith("slp")) test (long long unsigned int var_1, long long unsigned int var_12, short int a, short int b, short int c, short int d) { _Bool tem2; _Bool tem; unsigned int i_5; int _24; _Bool _28; short int _30; short int _32; __BB(2): _24 =3D test_var_3; tem_25 =3D _24 !=3D 0; tem2_26 =3D var_1_11(D) !=3D 0ul; _28 =3D tem_25 | tem2_26; _30 =3D _28 !=3D _Literal (_Bool) 0 ? a_16(D) : b_15(D); arr_20[0u] =3D _30; _32 =3D _28 !=3D _Literal (_Bool) 0 ? c_19(D) : d_18(D); arr_20[8u] =3D _32; arr_20[1u] =3D _30; arr_20[9u] =3D _32; arr_20[2u] =3D _30; arr_20[10u] =3D _32; arr_20[3u] =3D _30; arr_20[11u] =3D _32; arr_20[4u] =3D _30; arr_20[12u] =3D _32; arr_20[5u] =3D _30; arr_20[13u] =3D _32; arr_20[6u] =3D _30; arr_20[14u] =3D _32; arr_20[7u] =3D _30; arr_20[15u] =3D _32; return; }=