* [Bug target/53759] gcc -mavx emits vshufps for__builtin_ia32_loadlps
2012-06-24 12:36 [Bug target/53759] New: gcc -mavx emits vshufps for__builtin_ia32_loadlps dag at nimrod dot no
@ 2012-06-24 12:46 ` dag at nimrod dot no
2012-06-24 14:55 ` [Bug target/53759] [4.7/4.8 Regression] gcc -mavx emits vshufps for __builtin_ia32_loadlps hjl.tools at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: dag at nimrod dot no @ 2012-06-24 12:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53759
--- Comment #1 from Dag Lem <dag at nimrod dot no> 2012-06-24 12:45:55 UTC ---
Test code as follows:
------------------------
typedef float v4sf __attribute__ ((vector_size (4*4)));
typedef float v2sf __attribute__ ((vector_size (4*2)));
v2sf mem[1];
int main()
{
v4sf reg = (v4sf){0,0,0,0};
reg = __builtin_ia32_loadlps(reg, mem);
return reg[0];
}
------------------------
With -msse, gcc emits the following code:
xorps %xmm0, %xmm0
movlps mem, %xmm0
However with -mavx, gcc emits:
vxorps %xmm0, %xmm0, %xmm0
vmovlps mem, %xmm1, %xmm1
vshufps $0xe4, %xmm0, %xmm1, %xmm0
Shouldn't this rather have been something like
vxorps %xmm0, %xmm0, %xmm0
vmovlps mem, %xmm0, %xmm0
???
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/53759] [4.7/4.8 Regression] gcc -mavx emits vshufps for __builtin_ia32_loadlps
2012-06-24 12:36 [Bug target/53759] New: gcc -mavx emits vshufps for__builtin_ia32_loadlps dag at nimrod dot no
2012-06-24 12:46 ` [Bug target/53759] " dag at nimrod dot no
@ 2012-06-24 14:55 ` hjl.tools at gmail dot com
2012-06-24 15:47 ` hjl.tools at gmail dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2012-06-24 14:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53759
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-06-24
CC| |areg.melikadamyan at gmail
| |dot com, hjl.tools at gmail
| |dot com, ubizjak at gmail
| |dot com
Target Milestone|--- |4.7.2
Summary|gcc -mavx emits vshufps for |[4.7/4.8 Regression] gcc
|__builtin_ia32_loadlps |-mavx emits vshufps for
| |__builtin_ia32_loadlps
Ever Confirmed|0 |1
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2012-06-24 14:54:44 UTC ---
GCC 4.6 doesn't have this problem:
[hjl@gnu-6 pr53759]$ cat x.i
typedef float v4sf __attribute__ ((vector_size (4*4)));
typedef float v2sf __attribute__ ((vector_size (4*2)));
v2sf mem[1];
int main()
{
v4sf reg = (v4sf){0,0,0,0};
reg = __builtin_ia32_loadlps(reg, mem);
return reg[0];
}
[hjl@gnu-6 pr53759]$ gcc -S -mavx -O x.i
[hjl@gnu-6 pr53759]$ cat x.s
.file "x.i"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
vxorps %xmm0, %xmm0, %xmm0
vmovlps mem(%rip), %xmm0, %xmm0
vcvttss2si %xmm0, %eax
ret
.cfi_endproc
.LFE0:
.size main, .-main
.comm mem,8,8
.ident "GCC: (GNU) 4.6.3 20120306 (Red Hat 4.6.3-2)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-6 pr53759]$
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/53759] [4.7/4.8 Regression] gcc -mavx emits vshufps for __builtin_ia32_loadlps
2012-06-24 12:36 [Bug target/53759] New: gcc -mavx emits vshufps for__builtin_ia32_loadlps dag at nimrod dot no
2012-06-24 12:46 ` [Bug target/53759] " dag at nimrod dot no
2012-06-24 14:55 ` [Bug target/53759] [4.7/4.8 Regression] gcc -mavx emits vshufps for __builtin_ia32_loadlps hjl.tools at gmail dot com
@ 2012-06-24 15:47 ` hjl.tools at gmail dot com
2012-06-25 7:35 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2012-06-24 15:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53759
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-06-24 15:46:33 UTC ---
It is caused by revision 172123:
http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg00316.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/53759] [4.7/4.8 Regression] gcc -mavx emits vshufps for __builtin_ia32_loadlps
2012-06-24 12:36 [Bug target/53759] New: gcc -mavx emits vshufps for__builtin_ia32_loadlps dag at nimrod dot no
` (2 preceding siblings ...)
2012-06-24 15:47 ` hjl.tools at gmail dot com
@ 2012-06-25 7:35 ` jakub at gcc dot gnu.org
2012-06-25 8:51 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-25 7:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53759
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jakub at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/53759] [4.7/4.8 Regression] gcc -mavx emits vshufps for __builtin_ia32_loadlps
2012-06-24 12:36 [Bug target/53759] New: gcc -mavx emits vshufps for__builtin_ia32_loadlps dag at nimrod dot no
` (3 preceding siblings ...)
2012-06-25 7:35 ` jakub at gcc dot gnu.org
@ 2012-06-25 8:51 ` jakub at gcc dot gnu.org
2012-06-25 14:53 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-25 8:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53759
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-25 08:48:50 UTC ---
Created attachment 27699
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27699
gcc48-pr53759.patch
Sounds like an obvious typo in that change, the x, x, x alternative is already
earlier and shouldn't use vmovlps insn, so that obviously should have been x,
m, x.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/53759] [4.7/4.8 Regression] gcc -mavx emits vshufps for __builtin_ia32_loadlps
2012-06-24 12:36 [Bug target/53759] New: gcc -mavx emits vshufps for__builtin_ia32_loadlps dag at nimrod dot no
` (4 preceding siblings ...)
2012-06-25 8:51 ` jakub at gcc dot gnu.org
@ 2012-06-25 14:53 ` jakub at gcc dot gnu.org
2012-06-25 14:57 ` jakub at gcc dot gnu.org
2012-06-25 15:05 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-25 14:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53759
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-25 14:53:04 UTC ---
Author: jakub
Date: Mon Jun 25 14:52:59 2012
New Revision: 188937
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188937
Log:
PR target/53759
* config/i386/sse.md (sse_loadlps): Use x m x constraints instead
of x x x in the vmovlps load alternative.
* gcc.target/i386/pr53759.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr53759.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/sse.md
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/53759] [4.7/4.8 Regression] gcc -mavx emits vshufps for __builtin_ia32_loadlps
2012-06-24 12:36 [Bug target/53759] New: gcc -mavx emits vshufps for__builtin_ia32_loadlps dag at nimrod dot no
` (5 preceding siblings ...)
2012-06-25 14:53 ` jakub at gcc dot gnu.org
@ 2012-06-25 14:57 ` jakub at gcc dot gnu.org
2012-06-25 15:05 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-25 14:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53759
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-25 14:56:22 UTC ---
Author: jakub
Date: Mon Jun 25 14:56:17 2012
New Revision: 188938
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188938
Log:
PR target/53759
* config/i386/sse.md (sse_loadlps): Use x m x constraints instead
of x x x in the vmovlps load alternative.
* gcc.target/i386/pr53759.c: New test.
Added:
branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/pr53759.c
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/i386/sse.md
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/53759] [4.7/4.8 Regression] gcc -mavx emits vshufps for __builtin_ia32_loadlps
2012-06-24 12:36 [Bug target/53759] New: gcc -mavx emits vshufps for__builtin_ia32_loadlps dag at nimrod dot no
` (6 preceding siblings ...)
2012-06-25 14:57 ` jakub at gcc dot gnu.org
@ 2012-06-25 15:05 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-25 15:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53759
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-25 15:05:09 UTC ---
Should be fixed now, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread