From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31187 invoked by alias); 16 Jun 2017 07:51:22 -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 31170 invoked by uid 89); 16 Jun 2017 07:51:22 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-ot0-f177.google.com Received: from mail-ot0-f177.google.com (HELO mail-ot0-f177.google.com) (74.125.82.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Jun 2017 07:51:21 +0000 Received: by mail-ot0-f177.google.com with SMTP id y47so2860701oty.0 for ; Fri, 16 Jun 2017 00:51:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ypdY4l7BSEdi8mbWlZ9iTuqrqRXnaTem2PnW7tyIgN8=; b=anxs9a6zWNkbi4Yzj0urBPb+5AbdAyw+PXUlMbVudLBU4XQy1nCW5FK+chD08Yl4h+ yVyoVRZ6mAIM5ap8k6Q8TRZ7jDqeu/pjvsJY62dmt+jhK4iGW2hPQNaP1GQyL+zejPMl 0Am5TXfk10I+Y2TQajKZNUaI+rIQzIi/D4BDq2dmk4ji6OWyc3gJrpMNHS7JBibwPxty mBz2cw9L+diIeaxn0CGss3g2jACpARLmJlBjzcI/LRqa21IqCjUiCX9EGe5lmxtIRyOg uhE/z4MRxb/XAfLYgczIk2Xu1yWZzoSWoP+T8Mvj09pzGh+dEB2RMsYaDNczHzPVhWpV pr7Q== X-Gm-Message-State: AKS2vOwULxn5t7CsC05DeBJC2fbY/y8Le409B+X4O6mDrz9xbcRFkxF+ f3UYYfVw/P0NRDhuY7bcEbT9sAM4bodsbIw= X-Received: by 10.157.49.3 with SMTP id e3mr5994547otc.254.1497599484222; Fri, 16 Jun 2017 00:51:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.37.66 with HTTP; Fri, 16 Jun 2017 00:51:23 -0700 (PDT) In-Reply-To: <59903573.zuAO1vMF2R@polaris> References: <59903573.zuAO1vMF2R@polaris> From: Richard Biener Date: Fri, 16 Jun 2017 07:51:00 -0000 Message-ID: Subject: Re: [patch] Do not directly change TARGET_MEM_REF in maybe_canonicalize_mem_ref_addr To: Eric Botcazou Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg01164.txt.bz2 On Thu, Jun 15, 2017 at 3:51 PM, Eric Botcazou wrote: > Hi, > > the transformation done to TARGET_MEM_REF in maybe_canonicalize_mem_ref_addr > is exactly the same as one of those done in maybe_fold_tmr, the latter is > better written and the former function calls the latter, so this patch changes > maybe_canonicalize_mem_ref_addr to avoid touching TARGET_MEM_REF directly. > > Tested on x86-64/Linux, OK for the mainline? I don't think so. get_address_description assumes TMR_BASE is in canonical form, that is, when it is an ADDR_EXPR we have a symbol and when not we have a pointer. TMR[&p->a] violates this and the gimple-fold.c part first canonicalizes this to TMR[p + offsetof(a)]. Richard. > > 2017-06-15 Eric Botcazou > > PR bootstrap/80897 > * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Do not change > TARGET_MEM_REF expressions directly. > > -- > Eric Botcazou