[Bug other/95778] target_clones indirection eliminates requires noinline

yyc1992 at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Jun 20 15:49:38 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95778

--- Comment #2 from Yichao Yu <yyc1992 at gmail dot com> ---
Also, the original code example had an error, the code that works properly was

```
static __attribute__((noinline,target_clones("default,avx2"))) int f2(int *p)
{
    asm volatile ("" :: "r"(p) : "memory");
    return *p;
}

__attribute__((noinline,target_clones("default,avx2"))) int g2(int *p)
{
    return f2(p);
}
```


More information about the Gcc-bugs mailing list