From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24090 invoked by alias); 30 Jun 2011 19:42:37 -0000 Received: (qmail 24080 invoked by uid 22791); 30 Jun 2011 19:42:36 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Jun 2011 19:42:22 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id A4139CB0357 for ; Thu, 30 Jun 2011 21:42:21 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id promQZeu0zPa for ; Thu, 30 Jun 2011 21:42:18 +0200 (CEST) Received: from [192.168.1.2] (bon31-9-83-155-120-49.fbx.proxad.net [83.155.120.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 856DCCB02D5 for ; Thu, 30 Jun 2011 21:42:18 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Re: [patch] Fix oversight in tuplification of DOM Date: Thu, 30 Jun 2011 20:47:00 -0000 User-Agent: KMail/1.9.9 References: <201106282236.53994.ebotcazou@adacore.com> In-Reply-To: <201106282236.53994.ebotcazou@adacore.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_oGNDO7VHTKoWFqH" Message-Id: <201106302142.32816.ebotcazou@adacore.com> 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 X-SW-Source: 2011-06/txt/msg02400.txt.bz2 --Boundary-00=_oGNDO7VHTKoWFqH Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 664 > 2011-06-28 Eric Botcazou > > * tree-ssa-dom.c (initialize_hash_element): Fix oversight. As reported under PR tree-optimization/49572, using the type of the LHS like in the other cases leads to optimization regressions. The attached patch changes this to use the type of RHS instead in the GIMPLE_SINGLE_RHS case. Tested on x86_64-suse-linux, pre-approved by Richard in the PR, applied. 2011-06-30 Eric Botcazou PR tree-optimization/49572 * tree-ssa-dom.c (initialize_hash_element) : Use the type of the RHS instead of that of the LHS for the expression type. -- Eric Botcazou --Boundary-00=_oGNDO7VHTKoWFqH Content-Type: text/x-diff; charset="iso 8859-15"; name="p.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p.diff" Content-length: 658 Index: tree-ssa-dom.c =================================================================== --- tree-ssa-dom.c (revision 175621) +++ tree-ssa-dom.c (working copy) @@ -208,13 +208,11 @@ initialize_hash_element (gimple stmt, tr { enum tree_code subcode = gimple_assign_rhs_code (stmt); - expr->type = NULL_TREE; - switch (get_gimple_rhs_class (subcode)) { case GIMPLE_SINGLE_RHS: expr->kind = EXPR_SINGLE; - expr->type = TREE_TYPE (gimple_assign_lhs (stmt)); + expr->type = TREE_TYPE (gimple_assign_rhs1 (stmt)); expr->ops.single.rhs = gimple_assign_rhs1 (stmt); break; case GIMPLE_UNARY_RHS: --Boundary-00=_oGNDO7VHTKoWFqH--