aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-simd-clone.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/omp-simd-clone.c')
-rw-r--r--gcc/omp-simd-clone.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/omp-simd-clone.c b/gcc/omp-simd-clone.c
index b7737a2..fbcb92b 100644
--- a/gcc/omp-simd-clone.c
+++ b/gcc/omp-simd-clone.c
@@ -1574,6 +1574,10 @@ expand_simd_clones (struct cgraph_node *node)
tree attr = lookup_attribute ("omp declare simd",
DECL_ATTRIBUTES (node->decl));
if (attr == NULL_TREE
+ /* Ignore artificial decls with an abstract origin, results of function
+ cloning, versioning etc. We want to handle certain builtins
+ with simd attribute, like __builtin_sin. */
+ || (DECL_ARTIFICIAL (node->decl) && DECL_ABSTRACT_ORIGIN (node->decl))
|| node->global.inlined_to
|| lookup_attribute ("noclone", DECL_ATTRIBUTES (node->decl)))
return;