From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5FF11385AC0A; Thu, 18 Nov 2021 11:24:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5FF11385AC0A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103253] [12 Regression] ICE: Segmentation fault (in convert_mult_to_fma or in vect_recog_mask_conversion_pattern) since r12-5129-g8ed62c929c7c4462 Date: Thu, 18 Nov 2021 11:24:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: tnfchris at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 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: Thu, 18 Nov 2021 11:24:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103253 --- Comment #11 from CVS Commits --- The master branch has been updated by Tamar Christina : https://gcc.gnu.org/g:1a0bce98dcf84dd0a7b3ac67b51ac68758cc7ad0 commit r12-5369-g1a0bce98dcf84dd0a7b3ac67b51ac68758cc7ad0 Author: Tamar Christina Date: Thu Nov 18 11:22:11 2021 +0000 middle-end: Fix FMA detection when inspecting gimple which have no LHS. convert_mult_to_fma assumes that all gimple_assigns have a LHS set. Th= is assumption is however not true when an IFN is kept around just for the side-effects. In those situations you have just the IFN and lhs will be null. Since there's no LHS, there also can't be any ADD and such it can't be = an FMA so it's correct to just return early if no LHS. gcc/ChangeLog: PR tree-optimization/103253 * tree-ssa-math-opts.c (convert_mult_to_fma): Check for LHS. gcc/testsuite/ChangeLog: PR tree-optimization/103253 * gcc.dg/vect/pr103253.c: New test.=