This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/80298] <x86intrin.h> incompatible with -mno-sse
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 04 Apr 2017 07:09:46 +0000
- Subject: [Bug target/80298] <x86intrin.h> incompatible with -mno-sse
- Auto-submitted: auto-generated
- References: <bug-80298-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80298
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-04-04
CC| |jakub at gcc dot gnu.org,
| |uros at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The only problems from what I can see are with 64-bit code and the MMX/3dNOW
headers. And the problem is that in x86-64 ABI the MMX vectors are passed and
returned in SSE registers, so even:
typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__));
__m64 foo (__m64 x, __m64 y)
{
return x + y;
}
fails to compile with -O2 -mno-sse -mmmx -m64. The above fails correctly.
What I'm not sure about is:
typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__));
__attribute__((always_inline)) inline __m64 foo (__m64 x, __m64 y)
{
return x + y;
}
void
bar (__m64 *x, __m64 *y, __m64 *z)
{
*x = foo (*y, *z);
}
Here we still error out, because foo has SSE return, but in reality as it is
always_inline inline function, we don't really care, the function must be
inlined. So I wonder if ix86_function_value or functions it calls shouldn't
special case always_inline inline functions and internal functions (something I
ran into with -fsanitize=signed-integer-overflow on vectors, pointless -Wpsabi
warnings) and be quiet on them.