From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15390 invoked by alias); 28 Apr 2015 16:24:28 -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 15332 invoked by uid 48); 28 Apr 2015 16:24:24 -0000 From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/65917] [6.0 regression] FAIL: gcc.dg/tree-ssa/20030922-2.c scan-tree-dump-times dom1 "if " 2 Date: Tue, 28 Apr 2015 16:24: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: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: law at redhat dot com X-Bugzilla-Target-Milestone: 6.0 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: 2015-04/txt/msg02427.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65917 --- Comment #4 from Jeffrey A. Law --- We'll probably need to XFAIL this for now. This is definitely a case where we were just getting lucky before and the new code to canonicalize the comparison arguments causes us not to get lucky. The single use heuristic doesn't help here, because both operands have multiple uses. I'd pondered walking up the use-def chains to guess which operand is more expensive to compute and use that as a heuristic as well, but in this case it'd do the opposite of what we want. I don't see other obvious heuristics that would resolve this issue. The "right" way to fix this would be to unify cprop and simplification -- ie, when we have a statement that references an SSA_NAME with one of these equivalences, we need to try both SSA_NAMEs and see if it simplifies. I've avoided doing that simply because it hasn't seemed worth the effort and compile-time cost.