From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10159 invoked by alias); 14 Aug 2014 17:42:07 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10111 invoked by uid 48); 14 Aug 2014 17:42:03 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/13962] [tree-ssa] make "fold" use alias information to optimize pointer comparisons Date: Thu, 14 Aug 2014 17:42:00 -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: tree-ssa X-Bugzilla-Keywords: alias, missed-optimization, xfail X-Bugzilla-Severity: enhancement X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00983.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13962 --- Comment #7 from Marc Glisse --- While looking at some unrelated issue, I noticed the following: _41 = operator new (28); ... if (_41 != &_S_empty_rep_storage) which happens with a simple use of std::string (with some extra inlining). __builtin_malloc(42)==&var is not optimized either, so it isn't (only) an issue with operator new. If the general case is too dangerous, maybe there is at least some subset that could safely be optimized?