From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53232 invoked by alias); 17 Jan 2019 12:51:04 -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 53207 invoked by uid 89); 17 Jan 2019 12:51:03 -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= X-HELO: mail-lj1-f193.google.com Received: from mail-lj1-f193.google.com (HELO mail-lj1-f193.google.com) (209.85.208.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Jan 2019 12:51:01 +0000 Received: by mail-lj1-f193.google.com with SMTP id l15-v6so8455444lja.9 for ; Thu, 17 Jan 2019 04:51:00 -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=ABIs4AsbuEHUiMFj9xFZlBM3MmeBXjIq0DG+2hRSPO0=; b=iMT4kGpZEZHFsw1enAopa/VyQFs26fgM02jaxRGq0rIUC8hTVJw7ZIAnMfeGBEInR1 xoCxubvA4trczZ86Ex6MzH0I/OpWOuVVhi3f9nUrbQ02ZgBSLFJpSM6f8qn5kk9IX9b+ AWqbLHLn409eUXrAWfGGsfsZtUPg3MVT2TS0i9DTgEA1q4USHhrFzJn7h6TYpbgxzYbO FyWyuRYh2hezfXBQJcIqSD5boPBmmPu2haOy0ToBtjvlRur6fwkaqwN23lqjSQyTiIDI YMJYZpGMmOrUSaScJaD6EzC7US3COzZH1uhDm0CISUHeo0VtrZoCYzTIXwCT8pW2mklt GCiQ== MIME-Version: 1.0 References: <0d2f9afa-b0fb-b81b-aba4-1f7f1faa5f35@suse.cz> <7848ce81-1dd2-9abd-08b2-86e9c2c40a18@suse.cz> In-Reply-To: <7848ce81-1dd2-9abd-08b2-86e9c2c40a18@suse.cz> From: Richard Biener Date: Thu, 17 Jan 2019 12:51: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/msg00996.txt.bz2 On Thu, Jan 17, 2019 at 12:21 PM Martin Li=C5=A1ka wrote: > > On 1/16/19 1:06 PM, Richard Biener wrote: > > On Wed, Jan 16, 2019 at 10:20 AM Martin Li=C5=A1ka wro= te: > >> > >> Hi. > >> > >> The patch is about resetting TYPE_MODE of vector types. This is proble= matic > >> when an inlining among different ISAs happen. Then we end up with a di= fferent > >> mode than when it's expected from debug info. > >> > >> When creating a new function decl in target_clones, we must valid_attr= ibute_p early > >> so that the declaration has a proper cl_target_.. node and so that inl= iner 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. > > Yep, update patch should be better. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? OK. Thanks, Richard. > Thanks, > Martin > > > > > 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 > >> > >> >