From 5a43070dcb85787cfa4ea3d99f1d0ef9d0aed002 Mon Sep 17 00:00:00 2001 From: iverbin Date: Fri, 22 Jul 2016 15:00:42 +0000 Subject: 2016-07-22 Evgeny Stupachenko gcc/ * ipa-cp.c (determine_versionability): Do not create constprop clones, when target_clones attribute is set. gcc/testsuite/ * gcc.target/i386/mvc8.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238645 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ipa-cp.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/ipa-cp.c') diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 4b7f6bbf31c..5b6cb9a143f 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -533,6 +533,13 @@ determine_versionability (struct cgraph_node *node, coexist, but that may not be worth the effort. */ reason = "function has SIMD clones"; } + else if (lookup_attribute ("target_clones", DECL_ATTRIBUTES (node->decl))) + { + /* Ideally we should clone the target clones themselves and create + copies of them, so IPA-cp and target clones can happily + coexist, but that may not be worth the effort. */ + reason = "function target_clones attribute"; + } /* Don't clone decls local to a comdat group; it breaks and for C++ decloned constructors, inlining is always better anyway. */ else if (node->comdat_local_p ()) -- cgit v1.2.1