From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26882 invoked by alias); 29 Apr 2015 08:50:19 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26871 invoked by uid 89); 29 Apr 2015 08:50:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SUBJ_ALL_CAPS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 29 Apr 2015 08:50:17 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D4807AB9A for ; Wed, 29 Apr 2015 08:50:14 +0000 (UTC) Date: Wed, 29 Apr 2015 08:53:00 -0000 From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] XFAIL PR65917 Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2015-04/txt/msg01836.txt.bz2 The testcase gcc.dg/tree-ssa/20030922-2.c FAILs on m68k (and possibly elsewhere), not on x86_64 though. So on x86_64 ifcombine has "removed" the if but after dom1 we still have _14 = *_13; if (_8 != _14) goto ; else goto ; : target_bb.1_15 = target_bb; _16 = _8 != target_bb.1_15; _17 = _14 == target_bb.1_15; _18 = _16 & _17; if (_18 != 0) which shows that running ifcombine before DOM might not be the best idea. It also shows that the testcase should disable ifcombine to really test what it was supposed to test. And then it also fails on x86_64. VRP does optimize this case because it has a more powerful way to track equivalences (and does a quadratic job in trying to simplify compares using all equivalences of the lhs vs all equivalences of the rhs). Which is another hint at the fact that DOM maybe shouldn't treat equivalences derived from conditionals in the SSA_VALUE table where you can't really record both _14 = target_bb.1_15 and target_bb.1_15 = _14 (which would get you a nice cycle there). For the existing way of DOM handlign this I don't see anything in the testcase that could be used to build a new heuristic (in fact another heuristic would say that what we do now is good -- _14 dies at the point where we build the equivalency, target_bb.1_15 does not, so we don't want to propagate _14 because that will increase its lifetime!) So the following "fixes" the testcase to also FAIL on x86_64 and XFAILs it. Tested on x86_64, applied. Richard. 2015-04-29 Richard Biener PR tree-optimization/65917 * gcc.dg/tree-ssa/20030922-2.c: Disable ifcombine and XFAIL. Index: gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c =================================================================== --- gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c (revision 222560) +++ gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c (working copy) @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom1" } */ +/* { dg-options "-O1 -fdump-tree-dom1 -fdisable-tree-ifcombine" } */ struct rtx_def; typedef struct rtx_def *rtx; @@ -20,5 +20,9 @@ rgn_rank (rtx insn1, rtx insn2) } /* There should be two IF conditionals. */ -/* { dg-final { scan-tree-dump-times "if " 2 "dom1" } } */ +/* This now fails as it requires a very specific decision of DOM which + SSA name to record as a copy of the other when DOM derives copies + from temporary equivalences. The heuristics there no longer do + the correct thing. VRP still optimizes this testcase. */ +/* { dg-final { scan-tree-dump-times "if " 2 "dom1" { xfail *-*-* } } } */ /* { dg-final { cleanup-tree-dump "dom1" } } */