From patchwork Mon Oct 11 19:45:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 67476 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 5AE51B70CB for ; Tue, 12 Oct 2010 06:44:30 +1100 (EST) Received: (qmail 4759 invoked by alias); 11 Oct 2010 19:44:28 -0000 Received: (qmail 4750 invoked by uid 22791); 11 Oct 2010 19:44:27 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Oct 2010 19:44:23 +0000 Received: (qmail 872 invoked from network); 11 Oct 2010 19:44:21 -0000 Received: from unknown (HELO ?84.152.215.94?) (bernds@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Oct 2010 19:44:21 -0000 Message-ID: <4CB36977.7000401@codesourcery.com> Date: Mon, 11 Oct 2010 21:45:59 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100911 Lightning/1.0b3pre Thunderbird/3.1.3 MIME-Version: 1.0 To: GCC Patches CC: marcus.shawcroft@arm.com Subject: combiner fix, PR45966 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The combine-4 patch caused PR45966. We have a 4->2 combination, and i0 feeds i1 which feeds i2. When substituting, we only check i0_feeds_i2 and i1_feeds_i2; we also need to check the i0_feeds_i1/i1_feeds_i2 chain and substitute accordingly. Bootstrapped and regression tested on i686-linux; ok? Bernd * combine.c (try_combine): If added_sets_2, deal with the case where i0 feeds i1 and i1 feeds i2. Index: combine.c =================================================================== --- combine.c (revision 164961) +++ combine.c (working copy) @@ -3213,6 +3213,8 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx t = subst (t, i0dest, i0src, 0, 0); if (i1_feeds_i2_n) t = subst (t, i1dest, i1src, 0, 0); + if (i0_feeds_i1_n && i1_feeds_i2_n) + t = subst (t, i0dest, i0src, 0, 0); XVECEXP (newpat, 0, --total_sets) = t; }