From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 96FF43858CDB; Fri, 30 Sep 2022 10:42:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96FF43858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664534534; bh=TnI2BhJCJSwU1GhzyOR/T+uS5kN2cIWCOpP1DTYST6I=; h=From:To:Subject:Date:From; b=O5w++k/yaLx4Kp0KChNd8mSFHH8dDuB5z3maU6UpEfQjMBagbzY8/008hjZHszIx9 WokFIwU0a0vwJmvHbJ1cAotmChRUua3qtSbfUH2Q12olM/mKQiogv4yePVdx/wbrhv 9RN3kqjzfTCcXE+DbRLI90zVq80rBh4isCPFSdPc= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107095] New: gcc.dg/vect/vect-89.c gets miscompiled by DSE Date: Fri, 30 Sep 2022 10:42:14 +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: rguenth 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=3D107095 Bug ID: 107095 Summary: gcc.dg/vect/vect-89.c gets miscompiled by DSE Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- When fully masked the loop with 256bit vectors gets optimized by FRE4 to [local count: 63136016]: .MASK_STORE (&tmp, 256B, { 0, -1, -1, -1, -1, -1, -1, -1 }, { 5, 5, 5, 5,= 5, 5, 5, 5 }); MEM [(int *)&tmp + 32B] =3D { 5, 5, 5, 5, 5, 5, 5, 5 }; .MASK_STORE (&MEM [(void *)&tmp + 64B], 256B, { -1, 0= , 0, 0, 0, 0, 0, 0 }, { 5, 5, 5, 5, 5, 5, 5, 5 }); [local count: 1010605809]: # i_18 =3D PHI # ivtmp_3 =3D PHI _1 =3D tmp.y[i_18]; if (_1 !=3D 5) goto ; [0.00%] else goto ; [100.00%] [count: 0]: abort (); [local count: 1010605809]: i_8 =3D i_18 + 1; ivtmp_5 =3D ivtmp_3 - 1; if (ivtmp_5 !=3D 0) goto ; [94.12%] else goto ; [5.88%] [local count: 951182190]: goto ; [100.00%] [local count: 63136016]: tmp =3D{v} {CLOBBER(eol)}; return 0; but then DSE comes along and removes the first .MASK_STORE: Deleted dead call: .MASK_STORE (&tmp, 256B, { 0, -1, -1, -1, -1, -1, -1, = -1 }, { 5, 5, 5, 5, 5, 5, 5, 5 });=