From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C35D38555AF; Fri, 30 Jun 2023 09:06:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C35D38555AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688116001; bh=VsUU0SWUIEl8KPzOseD3r0gVwq7BXp6vemxKUkeHFK8=; h=From:To:Subject:Date:From; b=d6XtUlol/+JOEc2GYYjvGdqxEPbtd757XMa3b0G3JxmNic8tqTsc6LP2v3HcQqyeA CyCMNV5PR7ga4j/VLtJfYO9nTAXCFQpcvaWvK81WlKMoFDS/ZcaYUetd14w9D6ZmwV 66yi0b4rwx0ncXjUgo9vaIReYL3w6Dq0zAccZ1sc= From: "kristerw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110495] New: fre introduces signed wrap for vector Date: Fri, 30 Jun 2023 09:06:41 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kristerw 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=3D110495 Bug ID: 110495 Summary: fre introduces signed wrap for vector Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: kristerw at gcc dot gnu.org Target Milestone: --- The following function (from gcc.dg/tree-ssa/addadd-2.c) typedef int S __attribute__((vector_size(64))); void j(S*x){ *x +=3D __INT_MAX__; *x +=3D __INT_MAX__; } is optimized by fre1 to=20 void j (S * x) { vector(16) int _1; vector(16) int _2; vector(16) int _4; : _1 =3D *x_6(D); _2 =3D _1 + { 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647 }; *x_6(D) =3D _2; _4 =3D _1 + { -2(OVF), -2(OVF), -2(OVF), -2(OVF), -2(OVF), -2(OVF), -2(OV= F), -2(OVF), -2(OVF), -2(OVF), -2(OVF), -2(OVF), -2(OVF), -2(OVF), -2(OVF), -2(= OVF) }; *x_6(D) =3D _4; return; } which has signed wrap for the cases where the original did not wrap.=