From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C792F388E808; Thu, 4 Jun 2020 09:08:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C792F388E808 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591261692; bh=6wKJ1j5aOTF36lyTwyscwA1O5a/dUcAGa1mMtH6kQ00=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZYI2yRTX4EffIIZF8mC25hKIw/yyimO4JNifM+mkzHvolrMlyOSvTk1ewsZq+CJQn XYTS5pcIpcItbkM60q6Ovf3+MYPlgoYbfXFaPATGs99hPcpS9VcD/JoFsAd1UXYq9h MEBzTtN0/jd4qKmg4z1wY4DKERjNf6uqKuyMrpRo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/89430] A missing ifcvt optimization to generate csel Date: Thu, 04 Jun 2020 09:08:12 +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: 9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: REOPENED 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, 04 Jun 2020 09:08:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D89430 --- Comment #15 from CVS Commits --- The master branch has been updated by Hao Liu : https://gcc.gnu.org/g:54ecfb182bc32140722022c1d9818dee4bdc0e45 commit r11-897-g54ecfb182bc32140722022c1d9818dee4bdc0e45 Author: Hao Liu Date: Thu Jun 4 16:28:37 2020 +0800 cselim: Extend to check non-trapping for more references [PR89430] If there is a dominating store, a store to the same reference can not be trapped. But previously, it only supports such check on MEM_REFs. So this patch extends it to support ARRAY_REFs and COMPONENT_REFs. This patch also supports a special case: if there is a dominating load = of local variable without address escape, a store is not trapped, as local stack is always writable. Other loads are ignored for simplicity, as t= hey don't help to check if a store can be trapped (the memory may be read-only). gcc/ChangeLog: PR tree-optimization/89430 * tree-ssa-phiopt.c (struct name_to_bb): Rename to ref_to_bb; add a new field exp; remove ssa_name_ver, store, offset fields. (struct ssa_names_hasher): Rename to refs_hasher; update functi= ons. (class nontrapping_dom_walker): Rename m_seen_ssa_names to m_seen_refs. (nontrapping_dom_walker::add_or_mark_expr): Extend to support ARRAY_REFs and COMPONENT_REFs. gcc/testsuite/ChangeLog: PR tree-optimization/89430 * gcc.dg/tree-ssa/pr89430-1.c: Remove xfail. * gcc.dg/tree-ssa/pr89430-2.c: Remove xfail. * gcc.dg/tree-ssa/pr89430-5.c: Remove xfail. * gcc.dg/tree-ssa/pr89430-6.c: Remove xfail. * gcc.dg/tree-ssa/pr89430-7-comp-ref.c: New test. * gcc.dg/tree-ssa/pr89430-8-mem-ref-size.c: New test. * gcc.dg/tree-ssa/ssa-pre-17.c: Add -fno-tree-cselim.=