From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0EED93858034; Tue, 25 Jan 2022 07:52:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0EED93858034 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/103641] [11/12 regression] Severe compile time regression in SLP vectorize step Date: Tue, 25 Jan 2022 07:52:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.3 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, 25 Jan 2022 07:52:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103641 --- Comment #25 from Richard Biener --- diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc index bea04992160..856b8bd222e 100644 --- a/gcc/tree-vect-patterns.cc +++ b/gcc/tree-vect-patterns.cc @@ -3050,13 +3050,13 @@ vect_synth_mult_by_constant (vec_info *vinfo, tree = op, tree val, /* Use MAX_COST here as we don't want to limit the sequence on rtx costs. The vectorizer's benefit analysis will decide whether it's beneficial to do this. */ - bool possible =3D choose_mult_variant (mode, hwval, &alg, + tree vectype =3D get_vectype_for_scalar_type (vinfo, multtype); + + bool possible =3D choose_mult_variant (TYPE_MODE (vectype), hwval, &alg, &variant, MAX_COST); if (!possible) return NULL; - tree vectype =3D get_vectype_for_scalar_type (vinfo, multtype); - if (!vectype || !target_supports_mult_synth_alg (&alg, variant, vectype, synth_shift_p)) improves compile-time from 29s to 12s for the testcase (-O0 compiled cc1 wi= th checking enabled ...), I didn't analyze what the actual difference in the chosen multiplication sequence is of course.=