On Mon, Oct 8, 2018 at 12:14 PM Martin Liška <mli...@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  <mli...@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  <mli...@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 <mli...@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  <mli...@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 via email to