public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/38034] New: Unnecssary register move
@ 2008-11-06 18:10 hjl dot tools at gmail dot com
2008-11-06 21:42 ` [Bug rtl-optimization/38034] " jakub at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-11-06 18:10 UTC (permalink / raw)
To: gcc-bugs
[hjl@gnu-14 prev-gcc]$ cat /tmp/x.c
#include <ia64intrin.h>
int
foo (int *p)
{
return __sync_lock_test_and_set (p, 0);
}
[hjl@gnu-14 prev-gcc]$ ./xgcc -B./ -O2 -S /tmp/x.c
[hjl@gnu-14 prev-gcc]$ cat x.s
.file "x.c"
.pred.safe_across_calls p1-p5,p16-p63
.text
.align 16
.align 64
.global foo#
.type foo#, @function
.proc foo#
foo:
.prologue
.body
.mmi
nop 0
mov r8 = r0
nop 0
;;
.mib
xchg4 r8 = [r32], r8
nop 0
br.ret.sptk.many b0
.endp foo#
.ident "GCC: (GNU) 4.4.0 20081106 (experimental) [trunk revision
141649]"
[hjl@gnu-14 prev-gcc]$
We don't need
mov r8 = r0
We should generate
xchg4 r8 = [r32], r0
--
Summary: Unnecssary register move
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ra
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: ia64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38034
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/38034] Unnecssary register move
2008-11-06 18:10 [Bug rtl-optimization/38034] New: Unnecssary register move hjl dot tools at gmail dot com
@ 2008-11-06 21:42 ` jakub at gcc dot gnu dot org
2009-02-13 21:58 ` hjl dot tools at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-11-06 21:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2008-11-06 21:41 -------
Created an attachment (id=16629)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16629&action=view)
gcc44-pr38034.patch
Untested patch to fix it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38034
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/38034] Unnecssary register move
2008-11-06 18:10 [Bug rtl-optimization/38034] New: Unnecssary register move hjl dot tools at gmail dot com
2008-11-06 21:42 ` [Bug rtl-optimization/38034] " jakub at gcc dot gnu dot org
@ 2009-02-13 21:58 ` hjl dot tools at gmail dot com
2009-03-27 22:28 ` hjl at gcc dot gnu dot org
2009-03-30 16:59 ` [Bug rtl-optimization/38034] Unnecessary " sje at cup dot hp dot com
3 siblings, 0 replies; 5+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-02-13 21:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from hjl dot tools at gmail dot com 2009-02-13 21:58 -------
A patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2009-02/msg00674.html
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at cup dot hp dot com
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2009-
| |02/msg00674.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38034
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/38034] Unnecssary register move
2008-11-06 18:10 [Bug rtl-optimization/38034] New: Unnecssary register move hjl dot tools at gmail dot com
2008-11-06 21:42 ` [Bug rtl-optimization/38034] " jakub at gcc dot gnu dot org
2009-02-13 21:58 ` hjl dot tools at gmail dot com
@ 2009-03-27 22:28 ` hjl at gcc dot gnu dot org
2009-03-30 16:59 ` [Bug rtl-optimization/38034] Unnecessary " sje at cup dot hp dot com
3 siblings, 0 replies; 5+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-03-27 22:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hjl at gcc dot gnu dot org 2009-03-27 22:28 -------
Subject: Bug 38034
Author: hjl
Date: Fri Mar 27 22:28:20 2009
New Revision: 145135
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145135
Log:
gcc/
2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
Jakub Jelinek <jakub@redhat.com>
PR target/38034
* config/ia64/sync.md (cmpxchg_rel_<mode>): Replace input
gr_register_operand with gr_reg_or_0_operand.
(cmpxchg_rel_di): Likewise.
(sync_lock_test_and_set<mode>): Likewise.
gcc/testsuite/
2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/38034
* gcc.target/ia64/sync-1.c: New.
Added:
trunk/gcc/testsuite/gcc.target/ia64/sync-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/ia64/sync.md
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38034
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/38034] Unnecessary register move
2008-11-06 18:10 [Bug rtl-optimization/38034] New: Unnecssary register move hjl dot tools at gmail dot com
` (2 preceding siblings ...)
2009-03-27 22:28 ` hjl at gcc dot gnu dot org
@ 2009-03-30 16:59 ` sje at cup dot hp dot com
3 siblings, 0 replies; 5+ messages in thread
From: sje at cup dot hp dot com @ 2009-03-30 16:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sje at cup dot hp dot com 2009-03-30 16:59 -------
Closing this out since it is now fixed for 4.5.
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Known to fail| |4.4.0
Known to work| |4.5.0
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38034
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-30 16:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-06 18:10 [Bug rtl-optimization/38034] New: Unnecssary register move hjl dot tools at gmail dot com
2008-11-06 21:42 ` [Bug rtl-optimization/38034] " jakub at gcc dot gnu dot org
2009-02-13 21:58 ` hjl dot tools at gmail dot com
2009-03-27 22:28 ` hjl at gcc dot gnu dot org
2009-03-30 16:59 ` [Bug rtl-optimization/38034] Unnecessary " sje at cup dot hp 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).