From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1A2CC3858C2C; Tue, 4 Jan 2022 21:31:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A2CC3858C2C From: "jakub 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: Tue, 04 Jan 2022 21:31:13 +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: jakub at gcc dot gnu.org 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: 12.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: Tue, 04 Jan 2022 21:31:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103905 --- Comment #5 from Jakub Jelinek --- >>From what I can see, ifcvt dump is the same between r12-1788 and r12-1789, = vect has quite a few changes in that function, but the function is fairly simple= in ifcvt, because almost nothing is inlined into it, so there is just the sing= le for (i =3D 0; i < nelt; ++i) d.perm[i] =3D i * 2 + odd; loop in that function. I see similar changes on reduced: struct S { unsigned char perm[64]; }; void bar (struct S *); void foo (unsigned int nelt, unsigned odd) { struct S d; unsigned i; for (i =3D 0; i < nelt; ++i) d.perm[i] =3D i * 2 + odd; bar (&d); } 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 m= ain with those arguments...=