From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23420 invoked by alias); 16 Dec 2017 14:04:38 -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 23389 invoked by uid 89); 16 Dec 2017 14:04:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*R:D*gcc.gnu.org, H*R:D*gnu.org, Hx-languages-length:1334 X-HELO: mail3-relais-sop.national.inria.fr Received: from mail3-relais-sop.national.inria.fr (HELO mail3-relais-sop.national.inria.fr) (192.134.164.104) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 16 Dec 2017 14:04:36 +0000 Received: from ip-122.net-89-2-94.rev.numericable.fr (HELO stedding) ([89.2.94.122]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Dec 2017 15:04:33 +0100 Date: Sat, 16 Dec 2017 14:04:00 -0000 From: Marc Glisse Reply-To: gcc-patches@gcc.gnu.org To: James Greenhalgh cc: gcc-patches@gcc.gnu.org, nd@arm.com, law@redhat.com Subject: Re: [Patch combine] Don't create vector mode ZERO_EXTEND from subregs In-Reply-To: <1513001933-17348-1-git-send-email-james.greenhalgh@arm.com> Message-ID: References: <1513001933-17348-1-git-send-email-james.greenhalgh@arm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-SW-Source: 2017-12/txt/msg01115.txt.bz2 I was happily going to close PR 55549, but it looks like we are trying the same transformation in a second place in that file :-( On Mon, 11 Dec 2017, James Greenhalgh wrote: > Hi, > > In simplify_set we try transforming the paradoxical subreg expression: > > (set FOO (subreg:M (mem:N BAR) 0)) > > in to: > > (set FOO (zero_extend:M (mem:N BAR))) > > However, this code does not consider the case where M is a vector > mode, allowing it to construct (for example): > > (zero_extend:V4SI (mem:SI)) > > This would clearly have the wrong semantics, but fortunately we fail long > before then in expand_compound_operation. As we really don't want a vector > zero_extend of a scalar value. > > We need to explicitly reject vector modes from this transformation. > > This fixes a failure I'm seeing on a branch in which I'm trying to > tackle some performance regressions, so I have no live testcase for > this, but it is wrong by observation. > > Tested on aarch64-none-elf and bootstrapped on aarch64-none-linux-gnu with > no issues. > > OK? > > Thanks, > James > > --- > 2017-12-11 James Greenhalgh > > * combine.c (simplify_set): Do not transform subregs to zero_extends > if the destination mode is a vector mode. > > -- Marc Glisse