[Bug target/59794] [4.7/4.8/4.9 Regression] i386 backend fails to detect MMX/SSE/AVX return value

2014-01-14 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59794

--- Comment #6 from H.J. Lu hjl.tools at gmail dot com ---
[hjl@gnu-17 tmp]$ cat /tmp/f.i
typedef int __v4si __attribute__ ((__vector_size__ (16)));
typedef long long __m128i __attribute__ ((__vector_size__ (16),
__may_alias__));

__m128i
f1(void)
{
  return __extension__ (__m128i)(__v4si){ 0, 0, 0, 0 };
}
[hjl@gnu-17 tmp]$
/export/gnu/import/git/gcc-regression/gcc-4_0-branch/83189/usr/bin/gcc -S -O
/tmp/f.i -mno-sse -m32
/tmp/f.i: In function `f1':
/tmp/f.i:6: warning: SSE vector return without SSE enabled changes the ABI
[hjl@gnu-17 tmp]$
/export/gnu/import/git/gcc-regression/gcc-4_0-branch/83189/usr/bin/gcc -v
Reading specs from
/export/gnu/import/git/gcc-regression/gcc-4_0-branch/83189/usr/lib/gcc/x86_64-unknown-linux-gnu/3.5.0/specs
Configured with: ../../../gcc/configure
--prefix=/export/gnu/import/git/gcc-regression/gcc-4_0-branch/83189/usr
--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld
--enable-languages=c,c++ --disable-bootstrap
Thread model: posix
gcc version 3.5.0 20040615 (experimental)
[hjl@gnu-17 tmp]$
/export/gnu/import/git/gcc-regression/gcc-4_0-branch/85148/usr/bin/gcc -S -O
/tmp/f.i -mno-sse -m32
[hjl@gnu-17 tmp]$
/export/gnu/import/git/gcc-regression/gcc-4_0-branch/85148/usr/bin/gcc -v
Reading specs from
/export/gnu/import/git/gcc-regression/gcc-4_0-branch/85148/usr/lib/gcc/x86_64-unknown-linux-gnu/3.5.0/specs
Configured with: ../../../gcc/configure
--prefix=/export/gnu/import/git/gcc-regression/gcc-4_0-branch/85148/usr
--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld
--enable-languages=c,c++ --disable-bootstrap
Thread model: posix
gcc version 3.5.0 20040725 (experimental)
[hjl@gnu-17 tmp]$


[Bug target/59794] [4.7/4.8/4.9 Regression] i386 backend fails to detect MMX/SSE/AVX return value

2014-01-13 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59794

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 CC||rth at gcc dot gnu.org
Summary|i386 backend fails to   |[4.7/4.8/4.9 Regression]
   |detect SSE/AVX return value |i386 backend fails to
   ||detect MMX/SSE/AVX return
   ||value

--- Comment #4 from H.J. Lu hjl.tools at gmail dot com ---
This is a regression:

[hjl@gnu-6 tmp]$ cat m1.i
typedef int __v2si __attribute__ ((__vector_size__ (8)));

extern __v2si y;

__v2si
foo ()
{
  return y;
}
[hjl@gnu-6 tmp]$ cc -S -mno-mmx m1.i -m32
[hjl@gnu-6 tmp]$ 

This may be caused by r83533.  ix86_struct_value_rtx sees BLKmode
when SSE is disabled and DImode when MMX is disabled.


[Bug target/59794] [4.7/4.8/4.9 Regression] i386 backend fails to detect MMX/SSE/AVX return value

2014-01-13 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59794

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

  Attachment #31826|0   |1
is obsolete||

--- Comment #5 from H.J. Lu hjl.tools at gmail dot com ---
Created attachment 31827
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31827action=edit
An updated patch