From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83660 invoked by alias); 23 Mar 2015 15:26:39 -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 83647 invoked by uid 89); 23 Mar 2015 15:26:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ob0-f180.google.com Received: from mail-ob0-f180.google.com (HELO mail-ob0-f180.google.com) (209.85.214.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 23 Mar 2015 15:26:38 +0000 Received: by obcjt1 with SMTP id jt1so105335276obc.2 for ; Mon, 23 Mar 2015 08:26:36 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.93.134 with SMTP id r128mr72216610oib.95.1427124396232; Mon, 23 Mar 2015 08:26:36 -0700 (PDT) Received: by 10.60.146.129 with HTTP; Mon, 23 Mar 2015 08:26:36 -0700 (PDT) In-Reply-To: <20150323150738.GX1746@tucnak.redhat.com> References: <20150323150738.GX1746@tucnak.redhat.com> Date: Mon, 23 Mar 2015 15:26:00 -0000 Message-ID: Subject: Re: [PATCH] Add some REG_POINTER flags during ix86 memcpy/memset expansion (PR target/65504) From: Uros Bizjak To: Jakub Jelinek Cc: Jan Hubicka , "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-03/txt/msg01190.txt.bz2 On Mon, Mar 23, 2015 at 4:07 PM, Jakub Jelinek wrote: > As expand_set_or_movmem_prologue_epilogue_by_misaligned_moves uses > src = src - (adjusted_dest - dest) > without proper REG_POINTER flags the aliasing code is very easily confused > on what is really a pointer and what is not - as REG_POINTER was used > after forwprop only on dest, but not on anything else, aliasing code thinks > that the memcpy reads dest based memory, when it really reads src based > memory (in the testcase frame pointer based in the end, but CSE did not see > it through). > > Fixed by marking pseudos that must hold pointers with REG_POINTER during > the expansion. Bootstrapped/regtested on x86_64-linux and i686-linux, ok > for trunk? > > 2015-03-23 Jakub Jelinek > > PR target/65504 > * config/i386/i386.c (ix86_copy_addr_to_reg): Set REG_POINTER > on the pseudo. > (expand_set_or_movmem_prologue_epilogue_by_misaligned_moves): Set > REG_POINTER on *destptr after adjusting it for prologue size. > > * gfortran.dg/pr65504.f90: New test. OK. Thanks, Uros.