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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2025-02-28
          Component|lto                         |target

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:

file0.cc:
```
typedef char __v32qi __attribute__ ((__vector_size__ (32)));
__v32qi g(__v32qi lo, __v32qi planar) {
 return __builtin_ia32_pshufb256(lo, planar);
}
```

file1.c:
```
#pragma GCC push_options
#pragma GCC target("avx2")
typedef char __v32qi __attribute__ ((__vector_size__ (32)));
__v32qi f(__v32qi lo, __v32qi planar) {
 return __builtin_ia32_pshufb256(lo, planar);
}
#pragma GCC pop_options
```

Compile with:
```
g++ -c -fPIC -O2 -mavx2 -flto file0.cc
g++ -c -fPIC -O2 -flto  file1.cc
g++ file0.o file1.o
```
Confirmed. There has to be some target specific issues with the builtins here.

Reply via email to