public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/34283] New: Non-optimal reload register used
@ 2007-11-29 7:27 ubizjak at gmail dot com
2009-06-22 22:18 ` [Bug rtl-optimization/34283] " steven at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2007-11-29 7:27 UTC (permalink / raw)
To: gcc-bugs
Following testcase:
--cut here--
typedef long long __m128i __attribute__ ((__vector_size__ (16),
__may_alias__));
typedef long long __v2di __attribute__ ((__vector_size__ (16)));
__m128i _mm_set_epi64x (long long __q1, long long __q0)
{
return __extension__ (__m128i)(__v2di){ __q0, __q1 };
}
--cut here--
compiles using -O2 -msse2 into:
_mm_set_epi64x:
movq 12(%esp), %xmm1
movhps 4(%esp), %xmm1
(1) movdqa %xmm1, %xmm0
ret
insn (1) is not needed.
Before reload, we have:
(insn:HI 12 7 18 2 epi.c:8 (set (reg/i:V2DI 21 xmm0 [ <result> ])
(vec_concat:V2DI (mem/c/i:DI (plus:SI (reg/f:SI 16 argp)
(const_int 8 [0x8])) [2 __q0+0 S8 A32])
(mem/c/i:DI (reg/f:SI 16 argp) [2 __q1+0 S8 A32]))) 1039
{vec_concatv2di} (nil))
(insn:HI 18 12 0 2 epi.c:8 (use (reg/i:V2DI 21 xmm0 [ <result> ])) -1 (nil))
For some reason reload isn't satisfied with %xmm0:
Reload 0: reload_in (DI) = (mem/c/i:DI (plus:SI (reg/f:SI 7 sp)
(const_int 12 [0xc]))
[2 __q0+0 S8 A32])
reload_out (V2DI) = (reg/i:V2DI 21 xmm0 [ <result> ])
SSE_REGS, RELOAD_OTHER (opnum = 0)
reload_in_reg: (mem/c/i:DI (plus:SI (reg/f:SI 7 sp)
(const_int 12 [0xc]))
[2 __q0+0 S8 A32])
reload_out_reg: (reg/i:V2DI 21 xmm0 [ <result> ])
reload_reg_rtx: (reg:V2DI 22 xmm1)
The insn pattern is:
[(set (match_operand:V2DI 0 "register_operand" "=Y2,?Y2,Y2,x,x,x")
(vec_concat:V2DI
(match_operand:DI 1 "nonimmediate_operand" " m,*y ,0 ,0,0,m")
(match_operand:DI 2 "vector_move_operand" " C, C,Y2,x,m,0")))]
So, reload should take into account that operand 1 should match operand 0, so
%xmm0 should be used.
--
Summary: Non-optimal reload register used
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ubizjak at gmail dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34283
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/34283] Non-optimal reload register used
2007-11-29 7:27 [Bug rtl-optimization/34283] New: Non-optimal reload register used ubizjak at gmail dot com
@ 2009-06-22 22:18 ` steven at gcc dot gnu dot org
2009-06-23 12:09 ` ubizjak at gmail dot com
2009-10-03 8:36 ` ubizjak at gmail dot com
2 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-06-22 22:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from steven at gcc dot gnu dot org 2009-06-22 22:18 -------
Uros, this bug is from the pre-IRA times. Could you check if you still see
this problem, please?
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34283
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/34283] Non-optimal reload register used
2007-11-29 7:27 [Bug rtl-optimization/34283] New: Non-optimal reload register used ubizjak at gmail dot com
2009-06-22 22:18 ` [Bug rtl-optimization/34283] " steven at gcc dot gnu dot org
@ 2009-06-23 12:09 ` ubizjak at gmail dot com
2009-10-03 8:36 ` ubizjak at gmail dot com
2 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2009-06-23 12:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ubizjak at gmail dot com 2009-06-23 12:09 -------
(In reply to comment #1)
> Uros, this bug is from the pre-IRA times. Could you check if you still see
> this problem, please?
Yes, it is still present as of gcc 4.5.0 20090623
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|0000-00-00 00:00:00 |2009-06-23 12:09:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34283
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/34283] Non-optimal reload register used
2007-11-29 7:27 [Bug rtl-optimization/34283] New: Non-optimal reload register used ubizjak at gmail dot com
2009-06-22 22:18 ` [Bug rtl-optimization/34283] " steven at gcc dot gnu dot org
2009-06-23 12:09 ` ubizjak at gmail dot com
@ 2009-10-03 8:36 ` ubizjak at gmail dot com
2 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2009-10-03 8:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ubizjak at gmail dot com 2009-10-03 08:36 -------
(In reply to comment #2)
> > Uros, this bug is from the pre-IRA times. Could you check if you still see
> > this problem, please?
>
> Yes, it is still present as of gcc 4.5.0 20090623
Reconfirmed with gcc version 4.5.0 20091003 (experimental) [trunk revision
152431].
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Ever Confirmed|0 |1
Last reconfirmed|2009-06-23 12:09:16 |2009-10-03 08:36:28
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34283
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/34283] Non-optimal reload register used
[not found] <bug-34283-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2012-10-27 7:49 ` uros at gcc dot gnu.org
@ 2012-10-27 7:53 ` ubizjak at gmail dot com
4 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2012-10-27 7:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34283
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.8.0
--- Comment #8 from Uros Bizjak <ubizjak at gmail dot com> 2012-10-27 07:53:30 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/34283] Non-optimal reload register used
[not found] <bug-34283-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2012-10-27 7:34 ` ubizjak at gmail dot com
@ 2012-10-27 7:49 ` uros at gcc dot gnu.org
2012-10-27 7:53 ` ubizjak at gmail dot com
4 siblings, 0 replies; 9+ messages in thread
From: uros at gcc dot gnu.org @ 2012-10-27 7:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34283
--- Comment #7 from uros at gcc dot gnu.org 2012-10-27 07:49:00 UTC ---
Author: uros
Date: Sat Oct 27 07:48:55 2012
New Revision: 192872
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192872
Log:
PR target/34283
* gcc.target/i386/pr34283.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr34283.c
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/34283] Non-optimal reload register used
[not found] <bug-34283-4@http.gcc.gnu.org/bugzilla/>
2012-01-20 10:34 ` ubizjak at gmail dot com
2012-10-23 18:33 ` glisse at gcc dot gnu.org
@ 2012-10-27 7:34 ` ubizjak at gmail dot com
2012-10-27 7:49 ` uros at gcc dot gnu.org
2012-10-27 7:53 ` ubizjak at gmail dot com
4 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2012-10-27 7:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34283
--- Comment #6 from Uros Bizjak <ubizjak at gmail dot com> 2012-10-27 07:33:41 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > Still present on x86_64. -O2 -march=corei7:
> >
> > movd %rsi, %xmm1
> > pinsrq $1, %rdi, %xmm1
> > movdqa %xmm1, %xmm0
> > ret
>
> It was still like that yesterday, but today:
>
> movd %rsi, %xmm0
> pinsrq $1, %rdi, %xmm0
> ret
>
> Fixed by LRA?
Looks so. I will prepare a testcase and close the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/34283] Non-optimal reload register used
[not found] <bug-34283-4@http.gcc.gnu.org/bugzilla/>
2012-01-20 10:34 ` ubizjak at gmail dot com
@ 2012-10-23 18:33 ` glisse at gcc dot gnu.org
2012-10-27 7:34 ` ubizjak at gmail dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-10-23 18:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34283
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |glisse at gcc dot gnu.org
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> 2012-10-23 18:33:07 UTC ---
(In reply to comment #4)
> Still present on x86_64. -O2 -march=corei7:
>
> movd %rsi, %xmm1
> pinsrq $1, %rdi, %xmm1
> movdqa %xmm1, %xmm0
> ret
It was still like that yesterday, but today:
movd %rsi, %xmm0
pinsrq $1, %rdi, %xmm0
ret
Fixed by LRA?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/34283] Non-optimal reload register used
[not found] <bug-34283-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-20 10:34 ` ubizjak at gmail dot com
2012-10-23 18:33 ` glisse at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2012-01-20 10:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34283
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vmakarov at gcc dot gnu.org
Known to fail| |4.7.0
--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-20 10:15:32 UTC ---
Still present on x86_64. -O2 -march=corei7:
movd %rsi, %xmm1
pinsrq $1, %rdi, %xmm1
movdqa %xmm1, %xmm0
ret
GCC: (GNU) 4.7.0 20120118 (experimental) [trunk revision 183277]
Re-confirmed and added CC.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-10-27 7:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-29 7:27 [Bug rtl-optimization/34283] New: Non-optimal reload register used ubizjak at gmail dot com
2009-06-22 22:18 ` [Bug rtl-optimization/34283] " steven at gcc dot gnu dot org
2009-06-23 12:09 ` ubizjak at gmail dot com
2009-10-03 8:36 ` ubizjak at gmail dot com
[not found] <bug-34283-4@http.gcc.gnu.org/bugzilla/>
2012-01-20 10:34 ` ubizjak at gmail dot com
2012-10-23 18:33 ` glisse at gcc dot gnu.org
2012-10-27 7:34 ` ubizjak at gmail dot com
2012-10-27 7:49 ` uros at gcc dot gnu.org
2012-10-27 7:53 ` ubizjak at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).