From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 853BF3858C2F; Tue, 17 Jan 2023 11:10:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 853BF3858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673953853; bh=fsTvHLDEBJ3QYuxY5LWfTe58w1dbJbznf+MVoeomLCQ=; h=From:To:Subject:Date:From; b=Cn/hFtt91uPoyk0WyOaBos9LLtpCWr8l2mOMBWFdsbF8T7uiYYF1MgjAcMUoxDvL/ rszxcWBwDMWbyoNyz/OHOeB1XFF6/8hlNueBmWnVf0cqK2kEpbOhaMQhYp2FOEKaQx RjLhCduBx+Wfm3TOealoaxW/uxpCV076HvUHCYLI= From: "acoplan at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108430] New: [13 Regression] Wrong code with -msve-vector-bits=512 since r13-707-g68e0063397 Date: Tue, 17 Jan 2023 11:10:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: acoplan 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108430 Bug ID: 108430 Summary: [13 Regression] Wrong code with -msve-vector-bits=3D512 since r13-707-g68e0063397 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- For the following testcase: static long d; static int i =3D 37; static unsigned long a[22]; static unsigned short c[22]; static unsigned g[80]; static unsigned short *h =3D c; static unsigned long *j =3D a; int main() { for (long m =3D 0; m < 8; ++m) d =3D 1; for (unsigned char p =3D 0; p < 17; p +=3D (d ? i : 0) - 35) { long t =3D h[p] ? i : j[p]; g[p] =3D t; } if (g[0]) __builtin_abort (); } we appear to miscompile it with -O3 -march=3Darmv8.2-a+sve -msve-vector-bit= s=3D512 since r13-707-g68e0063397ba820e71adc220b2da0581dce29ffa : commit 68e0063397ba820e71adc220b2da0581dce29ffa (HEAD, refs/bisect/bad)=20= =20=20=20=20=20=20=20=20 Author: Richard Biener =20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 Date: Mon Apr 11 12:36:53 2022=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 Force the selection operand of a GIMPLE COND_EXPR to be a register=