From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C08E3858405; Wed, 5 Jan 2022 05:43:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C08E3858405 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/103905] [12 Regression] Miscompiled i386-expand.c with -march=bdver1 and -O3 since r12-1789-g836328b2c99f5b8d Date: Wed, 05 Jan 2022 05:43:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status 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: Wed, 05 Jan 2022 05:43:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103905 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2022-01-05 --- Comment #7 from Martin Li=C5=A1ka --- >=20 > Do you know what nelt and odd values are used during the misbehaving > *_vec_even_odd on your testcase? If so, perhaps we could make bar noipa = and > add perm verification in there, make foo also noipa and just call it from > main with those arguments... Thanks Jakub for the hint. Apparently, I was quite close to the testcase, b= ut one needs nelt=3D8 and 64 elements of the perm array. So there's simplified test-case: $ cat xop.C int N =3D 8; char perm[64]; void __attribute__((noipa)) check (void) { for (int i =3D 0; i < N; ++i) __builtin_printf("perm[%d]=3D%d\n", i, perm[i]); if (perm[7] !=3D 7) __builtin_abort (); } int main() { for (int i =3D 0; i < N; ++i) perm[i] =3D i; check (); return 0; } $ gcc xop.C -march=3Dbdver1 -O3 $ ./a.out perm[0]=3D0 perm[1]=3D1 perm[2]=3D0 perm[3]=3D0 perm[4]=3D4 perm[5]=3D5 perm[6]=3D0 perm[7]=3D0 Aborted (core dumped)=