From patchwork Sat Aug 9 03:51:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 35179 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 89BE421457 for ; Sat, 9 Aug 2014 03:52:00 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf26481257oag.0 for ; Fri, 08 Aug 2014 20:52:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:sender:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results; bh=bYCf4eiw4LWiAzNw6iN5vBmt3PWrmKGBf11ltoSYK9E=; b=mYpLYmwomMXhM1uDZY/98fIJAnNRjpUz5BAOc0+44KnMeHw4I81dMSzXzW+ft0Biff /yN4jVi539ZlW/K3fK54zHtWTY9fJFotFy2P0Do6x1KB6xp7yz/iuL7vQ1zdTHvnW6Rw aPsFyqexFddH4yoXadKZ/NRgY70SJX0t2if8YCRRQ87HVrn119ufC1yQGmol+fUQmZGf 5HzcWebO0FYBmv3kQJxbV7EcRfOyOQ1q9M9OuKjOhBbV+gp90pee2N1Qi86mdLlNB9Tx 6frTnZP/Wt9gMQSnVCeQki0F7huHsYPmC9xVILsUrtQP5md5YXYeTT546iZu4McLJnXz ryfg== X-Gm-Message-State: ALoCoQlgE2LX9MMu1OAiZDd0L0eX1g8UE4BHLJSNINYs9hbLXoa0uxi5X33dNlG3UfE2kSgXir2Z X-Received: by 10.50.138.167 with SMTP id qr7mr971539igb.6.1407556320050; Fri, 08 Aug 2014 20:52:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.30.8 with SMTP id c8ls794369qgc.37.gmail; Fri, 08 Aug 2014 20:51:59 -0700 (PDT) X-Received: by 10.221.5.137 with SMTP id og9mr24204665vcb.18.1407556319902; Fri, 08 Aug 2014 20:51:59 -0700 (PDT) Received: from mail-vc0-x22b.google.com (mail-vc0-x22b.google.com [2607:f8b0:400c:c03::22b]) by mx.google.com with ESMTPS id q6si3535346veh.50.2014.08.08.20.51.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Aug 2014 20:51:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22b as permitted sender) client-ip=2607:f8b0:400c:c03::22b; Received: by mail-vc0-f171.google.com with SMTP id hq11so9361599vcb.30 for ; Fri, 08 Aug 2014 20:51:59 -0700 (PDT) X-Received: by 10.221.6.201 with SMTP id ol9mr11673587vcb.2.1407556319610; Fri, 08 Aug 2014 20:51:59 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp4008vcb; Fri, 8 Aug 2014 20:51:58 -0700 (PDT) X-Received: by 10.70.53.7 with SMTP id x7mr28609927pdo.38.1407556318144; Fri, 08 Aug 2014 20:51:58 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id n2si3946935pdr.191.2014.08.08.20.51.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Aug 2014 20:51:58 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-374725-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 13406 invoked by alias); 9 Aug 2014 03:51:29 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 Received: (qmail 13282 invoked by uid 89); 9 Aug 2014 03:51:28 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-ig0-f179.google.com Received: from mail-ig0-f179.google.com (HELO mail-ig0-f179.google.com) (209.85.213.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 09 Aug 2014 03:51:27 +0000 Received: by mail-ig0-f179.google.com with SMTP id h18so1971877igc.6 for ; Fri, 08 Aug 2014 20:51:25 -0700 (PDT) X-Received: by 10.42.64.77 with SMTP id f13mr16505681ici.72.1407556285049; Fri, 08 Aug 2014 20:51:25 -0700 (PDT) Received: from localhost.localdomain (64.2.3.195.ptr.us.xo.net. [64.2.3.195]) by mx.google.com with ESMTPSA id ck10sm17043352igb.17.2014.08.08.20.51.11 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 08 Aug 2014 20:51:11 -0700 (PDT) Received: from localhost.localdomain (apinskidesktop [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3/Debian-9.4) with ESMTP id s793pAMc012378 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Fri, 8 Aug 2014 20:51:10 -0700 Received: (from apinski@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id s793pAUd012377; Fri, 8 Aug 2014 20:51:10 -0700 From: Andrew Pinski To: gcc-patches@gcc.gnu.org Cc: Andrew Pinski Subject: [PATCH 1/2] Revert PR49721's patch Date: Fri, 8 Aug 2014 20:51:05 -0700 Message-Id: <1407556266-12337-2-git-send-email-apinski@cavium.com> In-Reply-To: <1407556266-12337-1-git-send-email-apinski@cavium.com> References: <1407556266-12337-1-git-send-email-apinski@cavium.com> X-Original-Sender: apinski@cavium.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22b as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 OK? When the second patch is approved? Thanks, Andrew Pinski ChangeLog: Revert: 2011-08-19 H.J. Lu PR middle-end/49721 * explow.c (convert_memory_address_addr_space): Also permute the conversion and addition of constant for zero-extend. --- gcc/explow.c | 19 +++++++------------ 1 files changed, 7 insertions(+), 12 deletions(-) diff --git a/gcc/explow.c b/gcc/explow.c index 92c4e57..eb7dc85 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -376,23 +376,18 @@ convert_memory_address_addr_space (enum machine_mode to_mode ATTRIBUTE_UNUSED, case PLUS: case MULT: - /* FIXME: For addition, we used to permute the conversion and - addition operation only if one operand is a constant and - converting the constant does not change it or if one operand - is a constant and we are using a ptr_extend instruction - (POINTERS_EXTEND_UNSIGNED < 0) even if the resulting address - may overflow/underflow. We relax the condition to include - zero-extend (POINTERS_EXTEND_UNSIGNED > 0) since the other - parts of the compiler depend on it. See PR 49721. - + /* For addition we can safely permute the conversion and addition + operation if one operand is a constant and converting the constant + does not change it or if one operand is a constant and we are + using a ptr_extend instruction (POINTERS_EXTEND_UNSIGNED < 0). We can always safely permute them if we are making the address narrower. */ if (GET_MODE_SIZE (to_mode) < GET_MODE_SIZE (from_mode) || (GET_CODE (x) == PLUS && CONST_INT_P (XEXP (x, 1)) - && (POINTERS_EXTEND_UNSIGNED != 0 - || XEXP (x, 1) == convert_memory_address_addr_space - (to_mode, XEXP (x, 1), as)))) + && (XEXP (x, 1) == convert_memory_address_addr_space + (to_mode, XEXP (x, 1), as) + || POINTERS_EXTEND_UNSIGNED < 0))) return gen_rtx_fmt_ee (GET_CODE (x), to_mode, convert_memory_address_addr_space (to_mode, XEXP (x, 0), as),