+2020-03-25 Martin Liska <mliska@suse.cz>
+
+ PR target/93274
+ PR ipa/94271
+ * config/i386/i386-features.c (make_resolver_func): Drop
+ public flag for resolver.
+ * config/rs6000/rs6000.c (make_resolver_func): Add comdat
+ group for resolver and drop public flag if possible.
+ * multiple_target.c (create_dispatcher_calls): Drop unique_name
+ and resolution as we want to enable LTO privatization of the default
+ symbol.
+
2020-03-25 Martin Liska <mliska@suse.cz>
PR lto/94259
DECL_COMDAT (decl) = 1;
make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl));
}
+ else
+ TREE_PUBLIC (ifunc_alias_decl) = 0;
+
/* Build result decl and add to function_decl. */
t = build_decl (UNKNOWN_LOCATION, RESULT_DECL, NULL_TREE, ptr_type_node);
DECL_CONTEXT (t) = decl;
DECL_INITIAL (decl) = make_node (BLOCK);
DECL_STATIC_CONSTRUCTOR (decl) = 0;
+ if (DECL_COMDAT_GROUP (default_decl)
+ || TREE_PUBLIC (default_decl))
+ {
+ /* In this case, each translation unit with a call to this
+ versioned function will put out a resolver. Ensure it
+ is comdat to keep just one copy. */
+ DECL_COMDAT (decl) = 1;
+ make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl));
+ }
+ else
+ TREE_PUBLIC (dispatch_decl) = 0;
+
/* Build result decl and add to function_decl. */
tree t = build_decl (UNKNOWN_LOCATION, RESULT_DECL, NULL_TREE, ptr_type_node);
DECL_CONTEXT (t) = decl;
node->externally_visible = false;
node->forced_by_abi = false;
node->set_section (NULL);
- node->unique_name = ((node->resolution == LDPR_PREVAILING_DEF_IRONLY
- || node->resolution == LDPR_PREVAILING_DEF_IRONLY_EXP)
- && !flag_incremental_link);
- node->resolution = LDPR_PREVAILING_DEF_IRONLY;
DECL_ARTIFICIAL (node->decl) = 1;
node->force_output = true;
+2020-03-25 Martin Liska <mliska@suse.cz>
+
+ PR target/93274
+ PR ipa/94271
+ * gcc.target/i386/pr81213-2.c: New test.
+ * gcc.target/i386/pr81213.c: Add additional source.
+ * gcc.dg/lto/pr94271_0.c: New test.
+ * gcc.dg/lto/pr94271_1.c: New test.
+
2020-03-25 Jakub Jelinek <jakub@redhat.com>
PR debug/94280
--- /dev/null
+/* PR lto/94271 */
+/* { dg-lto-do link } */
+
+int a;
+
+static int __attribute__ ((target_clones ("default", "avx512f"))) fast_clamp ()
+{}
+
+void
+c ()
+{
+ a = fast_clamp ();
+}
--- /dev/null
+int aa;
+
+static inline int __attribute__ ((target_clones ("default", "avx512f")))
+fast_clamp ()
+{}
+
+void
+b ()
+{
+ aa = fast_clamp ();
+}
+
+int
+main ()
+{
+ return 0;
+}
--- /dev/null
+__attribute__((target_clones("avx","arch=slm","arch=core-avx2","default")))
+static int
+foo ()
+{
+ return 2;
+}
+
+int bar()
+{
+ return foo();
+}
/* PR ipa/81214. */
-/* { dg-do compile } */
+/* { dg-do run } */
/* { dg-require-ifunc "" } */
+/* { dg-additional-sources "pr81213-2.c" } */
+
+int bar();
__attribute__((target_clones("avx","arch=slm","arch=core-avx2","default")))
static int
int main()
{
- return foo();
+ return foo() + bar();
}
/* { dg-final { scan-assembler "\t.globl\tfoo" } } */