From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2F37A3858D35; Thu, 30 Jul 2020 08:15:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F37A3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596096926; bh=VfotmSWfL+ZbVJDY70xAp7SpzkGyZNCwmlLbh1gFMa0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BJ5Z6PwhlbQYPx1bZkHf9QUpefFIKQ6+AGOzLyE4BTJLnzf1oNdK3cXa2BoK1+QVg 5HxxBsNJHn3iBPYTDLKKnPEZ/mtuXv3SYfAyP6qCAoV5j16x6ZxP+N7Cv1/tOzWQFG bmEsxlYgkWhhD0X4Jgc4sGig/vQON0nphdxXzbjI= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/96370] ICE with -ffast-math since r7-950-g8a85cee26eabf5cf Date: Thu, 30 Jul 2020 08:15:26 +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: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED 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: 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, 30 Jul 2020 08:15:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96370 --- Comment #5 from Richard Biener --- OK, so rewrite_expr_tree isn't prepared to see ops with a three component "leaf" as try_special_add_to_ops produces which turns { -b, b } into { b, b, -1 }. Instead it recurses into the apperant non-leaf _1 which is the negate. /* Recurse on the LHS of the binary operator, which is guaranteed to be the non-leaf side. */ tree new_rhs1 =3D rewrite_expr_tree (SSA_NAME_DEF_STMT (rhs1), opindex + 1, ops, changed || oe->op !=3D rhs2 || next_changed, false); But I have a simple fix.=