From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B7CF73858D1E; Mon, 19 Dec 2022 12:15:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7CF73858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671452107; bh=yh20sOcPGuUGU120ngJTEY6itgIoYDvgT7LkN+CW0OI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eqGaAK6RY7gJgEfG0t3lI2mCmosHjOnIef1HL2zbuu2BTuaMqfOReYE+5nToqxc1y bMwJM9iODrlfpbzqCec2qXNc7VyUNikQZvXM908VMaYz9+PGAieBjS9ppD8sGZ0E7O 3cAjsZwc8+9ezd8sbFzmWlnsnd0743oicyk5pZCw= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108164] [12/13 Regression] wrong code with "-O3 -fno-tree-dce" on x86_64-linux-gnu since r12-5267-g540d92ae9b629eb4 Date: Mon, 19 Dec 2022 12:15:07 +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: 13.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: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108164 --- Comment #6 from Richard Biener --- We vectorize [local count: 955630225]: # f_33 =3D PHI f.1_1 =3D (unsigned short) f_33; _2 =3D f.1_1 + 1; f_27 =3D (short int) _2; if (f_27 >=3D -1)=20 goto ; [89.00%] else goto ; [11.00%] [local count: 850510901]: goto ; [100.00%] [local count: 105119324]: # f_94 =3D PHI as _70 =3D (unsigned short) f_36; _69 =3D _70 + 1; _68 =3D _70 + 2; _67 =3D _70 + 3; _66 =3D _70 + 4; _65 =3D _70 + 5; _64 =3D _70 + 6; _63 =3D _70 + 7; _62 =3D {_70, _69, _68, _67, _66, _65, _64, _63}; _61 =3D (vector(8) short int) _62; [local count: 567644343]: # f_33 =3D PHI # vect_vec_iv_.21_59 =3D PHI <_56(16), _61(23)> # ivtmp_49 =3D PHI _58 =3D (vector(8) unsigned short) vect_vec_iv_.21_59; _57 =3D _58 + { 8, 8, 8, 8, 8, 8, 8, 8 }; _56 =3D (vector(8) short int) _57; vect_f.22_55 =3D VIEW_CONVERT_EXPR(vect_vec_iv_.21_59);=20 f.1_1 =3D (unsigned short) f_33;=20 vect__2.23_53 =3D vect_f.22_55 + { 1, 1, 1, 1, 1, 1, 1, 1 }; _2 =3D f.1_1 + 1;=20 vect_f_27.24_52 =3D VIEW_CONVERT_EXPR(vect__2.23_53); f_27 =3D (short int) _2; ivtmp_48 =3D ivtmp_49 + 1; if (ivtmp_48 < bnd.18_75) goto ; [83.33%] else goto ; [16.67%] [local count: 473036953]: goto ; [100.00%] [local count: 94607391]: # vect_f_27.24_51 =3D PHI _50 =3D BIT_FIELD_REF ; that looks wrong.=