public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>,
	renlin.li@foss.arm.com, 	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Redirect call within specific target attribute among MV clones (PR ipa/82625).
Date: Mon, 08 Oct 2018 10:34:00 -0000	[thread overview]
Message-ID: <CAFiYyc1=k-k9JkFZYZY-QQt3P2d226Ex5Zyx7sp77zbhcGvZwg@mail.gmail.com> (raw)
In-Reply-To: <e7fefa03-6260-1488-a4e9-f74c56777a56@suse.cz>

On Mon, Oct 8, 2018 at 12:14 PM Martin Liška <mliska@suse.cz> wrote:
>
> On 10/8/18 11:55 AM, Richard Earnshaw (lists) wrote:
> > On 08/10/18 10:47, Martin Liška wrote:
> >> On 10/8/18 10:46 AM, Renlin Li wrote:
> >>> Hi Martin,
> >>>
> >>> pr82625.C failed on compiler builds which don't support "default" and "avx" target.
> >>> For example, arm/aarch64 native linux gcc compiler.
> >>>
> >>>
> >>> As I found in this gcc wiki: https://gcc.gnu.org/wiki/FunctionMultiVersioning
> >>> '''
> >>> This support is available in GCC 4.8 and later. Support is only available in C++ for i386 targets.
> >>> '''
> >>>
> >>> Should the test be guarded with a target selector or require function multi-versioning instead of ifunc?
> >>
> >> Hi.
> >>
> >> Sure, sorry for the breakage. I'm going to install following tested patch.
> >>
> >> Martin
> >>
> >>>
> >>> Regards,
> >>> Renlin
> >>>
> >>>
> >>> On 10/04/2018 02:56 PM, Martin Liška wrote:
> >>>> Hi.
> >>>>
> >>>> When having a pair of target clones where foo calls bar, if the target
> >>>> attribute are equal we can redirect the call and not use ifunc dispatcher.
> >>>>
> >>>> Patch survives regression tests on x86_64-linux-gnu.
> >>>> Ready for trunk?
> >>>>
> >>>> Martin
> >>>>
> >>>> gcc/ChangeLog:
> >>>>
> >>>> 2018-10-04  Martin Liska  <mliska@suse.cz>
> >>>>
> >>>>     PR ipa/82625
> >>>>     * multiple_target.c (redirect_to_specific_clone): New function.
> >>>>     (ipa_target_clone): Use it.
> >>>>     * tree-inline.c: Fix comment.
> >>>>
> >>>> gcc/testsuite/ChangeLog:
> >>>>
> >>>> 2018-10-04  Martin Liska  <mliska@suse.cz>
> >>>>
> >>>>     PR ipa/82625
> >>>>     * g++.dg/ext/pr82625.C: New test.
> >>>> ---
> >>>>   gcc/multiple_target.c              | 51 ++++++++++++++++++++++++++++++
> >>>>   gcc/testsuite/g++.dg/ext/pr82625.C | 36 +++++++++++++++++++++
> >>>>   gcc/tree-inline.c                  |  2 +-
> >>>>   3 files changed, 88 insertions(+), 1 deletion(-)
> >>>>   create mode 100644 gcc/testsuite/g++.dg/ext/pr82625.C
> >>>>
> >>>>
> >>
> >>
> >> 0001-Limit-a-MV-test-just-for-x86-target.patch
> >>
> >>
> >> From e3053abe58eba832262db0af77980012010a642c Mon Sep 17 00:00:00 2001
> >> From: marxin <mliska@suse.cz>
> >> Date: Mon, 8 Oct 2018 11:07:29 +0200
> >> Subject: [PATCH] Limit a MV test just for x86 target.
> >>
> >> gcc/testsuite/ChangeLog:
> >>
> >> 2018-10-08  Martin Liska  <mliska@suse.cz>
> >>
> >>      * g++.dg/ext/pr82625.C: Add dg-compile filter.
> >> ---
> >>  gcc/testsuite/g++.dg/ext/pr82625.C | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/gcc/testsuite/g++.dg/ext/pr82625.C b/gcc/testsuite/g++.dg/ext/pr82625.C
> >> index 47bd2df1104..59b174f8c51 100644
> >> --- a/gcc/testsuite/g++.dg/ext/pr82625.C
> >> +++ b/gcc/testsuite/g++.dg/ext/pr82625.C
> >> @@ -1,6 +1,7 @@
> >>  /* { dg-do compile } */
> >>  /* { dg-require-ifunc "" } */
> >>  /* { dg-options "-O2 -fdump-tree-optimized" } */
> >> +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
> >>
> >>  __attribute__ ((target ("default")))
> >>  static unsigned foo(const char *buf, unsigned size) {
> >>
> >
> > Which begs the question why is this not put under g++.target?
> >
> > R.
> >
>
> Agree, apparently we have quite some tests that should be moved:
> gcc/testsuite/g++.dg/ext/pr57362.C:/* { dg-require-ifunc "" }  */
> gcc/testsuite/g++.dg/ext/pr57548.C:/* { dg-require-ifunc "" }  */
> gcc/testsuite/g++.dg/ext/pr82625.C:/* { dg-require-ifunc "" } */
> gcc/testsuite/g++.dg/ext/pr85329-2.C:/* { dg-require-ifunc "" } */
> gcc/testsuite/g++.dg/ext/pr85329.C:/* { dg-require-ifunc "" } */
> ...
> gcc/testsuite/g++.dg/ext/mv*.C

You cannot move C++ tests to gcc.target/

> I'll prepare patch for it.
> Martin
>

  reply	other threads:[~2018-10-08 10:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 14:12 Martin Liška
2018-10-04 14:34 ` Jeff Law
2018-10-04 14:58   ` Martin Liška
2018-10-08  9:16 ` Renlin Li
2018-10-08 10:06   ` Martin Liška
2018-10-08 10:11     ` Richard Earnshaw (lists)
2018-10-08 10:29       ` Martin Liška
2018-10-08 10:34         ` Richard Biener [this message]
2018-10-08 10:46           ` Martin Liška
2018-10-08 10:55             ` Jakub Jelinek
2018-10-08 11:01               ` Martin Liška
2018-10-08 11:14           ` Richard Earnshaw (lists)
2018-10-08 11:29             ` [PATCH] Come up with gcc/testsuite/g++.target/i386/i386.dg and move there some tests Martin Liška
2018-10-08 11:33               ` Jakub Jelinek
2018-10-08 11:47                 ` Uros Bizjak
2018-10-08 12:49                   ` Martin Liška
2018-10-08 13:21                     ` Uros Bizjak
2018-10-09  9:52                       ` Martin Liška
2018-10-09 10:06                         ` Rainer Orth
2018-10-09 11:44                           ` Martin Liška
2018-10-12  9:27                             ` Rainer Orth
2018-10-22 10:24                               ` Martin Liška
2018-10-22 10:31                                 ` Jakub Jelinek
2018-10-22 13:08                                   ` Martin Liška
2018-11-16 17:01                                     ` Renlin Li
2018-11-20 12:08                                       ` Martin Liška

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFiYyc1=k-k9JkFZYZY-QQt3P2d226Ex5Zyx7sp77zbhcGvZwg@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    --cc=renlin.li@foss.arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).