2015-06-16 17:23 GMT+03:00 Joseph Myers <jos...@codesourcery.com>:
> On Mon, 15 Jun 2015, Andrew Pinski wrote:
>
>> > results in asm redirection for log to __log_finite and final vector
>> > function name becomes _ZGVbN2v___log_finite.
>> >
>> > With point of view from C Library side, it reflects in addition of asm
>> > redirections _ZGVbN2v___log_finite = _ZGVbN2v_log in the headers.
>> >
>> > May be the cleaner way is to base vector name on original name of
>> > declaration, not asm declaration name (use DECL_NAME instead of
>> > DECL_ASSEMBLER_NAME)?
>>
>>
>> I don't think this would be useful really because if you have a
>> function say logl where you have two options of long double, you want
>> to support both you would name one logl and the other logl128 and then
>> using DECL_ASSEMBLER_NAME to from the SIMD name would be useful to use
>> the one with logl128 in it rather than logl.
>
> The point is that the vector versions may not be in one-to-one
> correspondence with the scalar versions - you might have several different
> scalar versions depending on compiler options, all of which correspond to
> a single vector version.

Lets come to agreement to change vector function name formation in
future GCC versions?

Patch to fix it looks quite simple. I am going to regtest it.

diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index d41688b..8d9de76 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -18687,7 +18687,7 @@ simd_clone_mangle (struct cgraph_node *node,
     }

   pp_underscore (&pp);
-  const char *str = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->decl));
+  const char *str = IDENTIFIER_POINTER (DECL_NAME (node->decl));
   if (*str == '*')
     ++str;
   pp_string (&pp, str);



--
WBR,
Andrew

Reply via email to