From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 03AE43858C56; Thu, 13 Oct 2022 12:05:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03AE43858C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665662732; bh=dClpybrTx5cCGGiW09mKdbT25ZshlI9A4CiA++XCDUE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jv62uBWKXLYcroSJp5jaIRG56ZvEO2qLrZapNXucVJSQ9MEBl8XmW+ACQNTeot2aF aGA7Nb0pTm5BOkxDItXBQwKcFrKa6OmQ1gBrni20BXj8NkpWhveoilZDOY6/XuQ45h XAfPY5V5OKs0jgigtQwlPeEC0w1Q+5LhcE0N3a3k= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107160] [13 regression] r13-2641-g0ee1548d96884d causes verification failure in spec2006 Date: Thu, 13 Oct 2022 12:05:31 +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: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107160 --- Comment #14 from Richard Biener --- Aha, so the issue is that we have a vectorized epilogue here and the epilog= ue of _that_ ends up doing [local count: 94607391]: # sum0_48 =3D PHI # sum1_47 =3D PHI # sum2_46 =3D PHI # sum3_45 =3D PHI # vect_sum3_31.16_101 =3D PHI # vect_sum3_31.16_102 =3D PHI # vect_sum3_31.16_103 =3D PHI # vect_sum3_31.16_104 =3D PHI _105 =3D BIT_FIELD_REF ; _106 =3D BIT_FIELD_REF ; ... this is from the main vect [local count: 81467476]: # sum0_135 =3D PHI # sum1_136 =3D PHI # sum2_137 =3D PHI # sum3_138 =3D PHI # vect_sum3_50.25_159 =3D PHI this is from the epilogue [local count: 105119324]: # sum0_15 =3D PHI # sum1_77 =3D PHI # sum2_75 =3D PHI # sum3_13 =3D PHI # _160 =3D PHI _161 =3D BIT_FIELD_REF <_160, 32, 0>; _162 =3D BIT_FIELD_REF <_160, 32, 32>; _163 =3D BIT_FIELD_REF <_160, 32, 64>; _164 =3D BIT_FIELD_REF <_160, 32, 96>; _74 =3D _161 + _162; _76 =3D _74 + _163; _78 =3D _76 + _164; so we fail to accumulate the main loops accumulators and just use the first one. On x86 the vectorized epilogue uses a smaller vector size but the same number of accumulators. It seems it's simply unexpected to have the unrolled SLP reduction and a vectorized epilogue with the same vector mode (but not unrolled). I can reproduce the failure when patching the x86 cost model to force unrolling by 2 (maybe we want a --param to force that to aid debugging...).=