From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62941 invoked by alias); 16 Jan 2019 12:06:52 -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 62919 invoked by uid 89); 16 Jan 2019 12:06:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2263 X-HELO: mail-lf1-f66.google.com Received: from mail-lf1-f66.google.com (HELO mail-lf1-f66.google.com) (209.85.167.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 Jan 2019 12:06:49 +0000 Received: by mail-lf1-f66.google.com with SMTP id c16so4678208lfj.8 for ; Wed, 16 Jan 2019 04:06:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=OCMtLx+TtWH4p2PcMmk1WdbT2Kt+wXMv6rdm7SVIiN0=; b=Qruk+QfH7sGgDwEf5puuUXf3JSy7RpTW7GHadkbLflnizfZdOADX9g9LWG3LRNRgbf Pkn4SNfYvDTniXvbOz2Q7/NH10UHM4xwiyq7EO+KaPd6pfHKTSzVxueWNtCfMA7TsqwY p6WFJwz4E2biLBoqqVYJXI2EdTabiouD1S9ZtrrpOCWGo0ibscBrb51zR4Gxp9EFm2vb rdAFchBGMvg+WCL4q6Re1i4VntjpX99gRcSkHs8PxKTBijjgEMYaCBOxb2qlSi9njKj8 S44oAt97WxQaF5ZixNczJ2qeKD21/LdLM+33K5KyVFGMkV5MnkYf4UQzpcXELu69yM6B 0USA== MIME-Version: 1.0 References: <0d2f9afa-b0fb-b81b-aba4-1f7f1faa5f35@suse.cz> In-Reply-To: <0d2f9afa-b0fb-b81b-aba4-1f7f1faa5f35@suse.cz> From: Richard Biener Date: Wed, 16 Jan 2019 12:06:00 -0000 Message-ID: Subject: Re: [PATCH] Reset proper type on vector types (PR middle-end/88587). To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00903.txt.bz2 On Wed, Jan 16, 2019 at 10:20 AM Martin Li=C5=A1ka wrote: > > Hi. > > The patch is about resetting TYPE_MODE of vector types. This is problemat= ic > when an inlining among different ISAs happen. Then we end up with a diffe= rent > mode than when it's expected from debug info. > > When creating a new function decl in target_clones, we must valid_attribu= te_p early > so that the declaration has a proper cl_target_.. node and so that inline= r can > fix modes. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? I don't like the new failure mode too much. It looks like create_version_clone_with_body can fail so why not simply return NULL when targetm.target_option.valid_attribute_p returns false and handle that case in multi-versioning? That is, + return !seen_error (); that looks very wrong to me. Richard. > Thanks, > Martin > > gcc/ChangeLog: > > 2019-01-16 Martin Liska > Richard Biener > > PR middle-end/88587 > * cgraph.h (create_version_clone_with_body): Add new argument > with attributes. > * cgraphclones.c (cgraph_node::create_version_clone): Add > DECL_ATTRIBUTES to a newly created decl. And call > valid_attribute_p so that proper cl_target_optimization_node > is set for the newly created declaration. > * multiple_target.c (create_target_clone): Set DECL_ATTRIBUTES > for declaration. > (expand_target_clones): Do not call valid_attribute_p, it must > be already done. > * tree-inline.c (copy_decl_for_dup_finish): Reset mode for > vector types. > > gcc/testsuite/ChangeLog: > > 2019-01-16 Martin Liska > > PR middle-end/88587 > * g++.target/i386/pr88587.C: New test. > * gcc.target/i386/mvc13.c: New test. > --- > gcc/cgraph.h | 7 +++++- > gcc/cgraphclones.c | 18 +++++++++++++- > gcc/multiple_target.c | 32 ++++++++----------------- > gcc/testsuite/g++.target/i386/pr88587.C | 15 ++++++++++++ > gcc/testsuite/gcc.target/i386/mvc13.c | 9 +++++++ > gcc/tree-inline.c | 4 ++++ > 6 files changed, 61 insertions(+), 24 deletions(-) > create mode 100644 gcc/testsuite/g++.target/i386/pr88587.C > create mode 100644 gcc/testsuite/gcc.target/i386/mvc13.c > >