From patchwork Tue Apr 24 08:43:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 154624 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 BF951B6FDF for ; Tue, 24 Apr 2012 18:43:43 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1335861826; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=F5V7qrF P8l4VSJMZbTVe3Lj7Euc=; b=eBexxbiTEiF9AtHmPPgUq8Gzppp/NJ+8wEWEy0D dUF5uQAK5zCmCBu/n+/IAAqhYiwwhIFjy8MXm/lb7PCC02gwrDCJ/byAEgITdaJe +BAfpYMGPChanoWmfjVYI37FPmi4iC1FkA4hZJjfaQ6EOy6IkYVrlro2jEPPYGGk mYmQ= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=qe0zNM4mV0AhJJtbX9/R2cHRdes4i80j5cr9F4OCzPZkILZYDDrU0eyLGLYNnS /GQnrOvwWJW52wM54fHkyLLmkuXq4yY+pnG2efhwsM0QjVT6pVgkZlQit+psh96q bQeSbsUv2kjy7wk1TDr0ekNdm/tvptPnEU2ko8ypGt048=; Received: (qmail 31649 invoked by alias); 24 Apr 2012 08:43:38 -0000 Received: (qmail 31631 invoked by uid 22791); 24 Apr 2012 08:43:36 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wi0-f173.google.com (HELO mail-wi0-f173.google.com) (209.85.212.173) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Apr 2012 08:43:20 +0000 Received: by wibhq7 with SMTP id hq7so3084559wib.8 for ; Tue, 24 Apr 2012 01:43:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.78.164 with SMTP id c4mr29171204wix.10.1335256999467; Tue, 24 Apr 2012 01:43:19 -0700 (PDT) Received: by 10.216.100.197 with HTTP; Tue, 24 Apr 2012 01:43:19 -0700 (PDT) Date: Tue, 24 Apr 2012 01:43:19 -0700 Message-ID: Subject: [Committed] Fix bootstrap issue in tree-ssa-forwprop.c From: Andrew Pinski To: GCC Patches X-IsSubscribed: yes 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 I tested my two patches independently and forgot to test together and one used a variable which I removed in the other. Anyways this patch changes the code to be correct and fixes the bootstrap issue. Committed as obvious after building stage1. Thanks, Andrew Pinski ChangeLog: 2012-04-24 Andrew Pinski * tree-ssa-forwprop.c (simplify_bitwise_binary): Don't directly use def1/def2. Index: ChangeLog =================================================================== --- ChangeLog (revision 186756) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2012-04-24 Andrew Pinski + + * tree-ssa-forwprop.c (simplify_bitwise_binary): + Don't directly use def1/def2. + 2012-04-24 Richard Guenther PR tree-optimization/53098 Index: tree-ssa-forwprop.c =================================================================== --- tree-ssa-forwprop.c (revision 186755) +++ tree-ssa-forwprop.c (working copy) @@ -1913,10 +1913,10 @@ simplify_bitwise_binary (gimple_stmt_ite /* Simplify (A & B) OP0 (C & B) to (A OP0 C) & B. */ if (def1_code == def2_code && def1_code == BIT_AND_EXPR - && operand_equal_for_phi_arg_p (gimple_assign_rhs2 (def1), - gimple_assign_rhs2 (def2))) + && operand_equal_for_phi_arg_p (def1_arg2, + def2_arg2)) { - tree b = gimple_assign_rhs2 (def1); + tree b = def1_arg2; tree a = def1_arg1; tree c = def2_arg1; tree inner = fold_build2 (code, TREE_TYPE (arg2), a, c);