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?

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


Reply via email to