public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/16356] New: Failure to use count register
@ 2004-07-04 6:15 anton at samba dot org
2004-07-04 7:07 ` [Bug rtl-optimization/16356] Failure to use count register (branch on count register) pinskia at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: anton at samba dot org @ 2004-07-04 6:15 UTC (permalink / raw)
To: gcc-bugs
I was retesting bug 14886 on 3.5 cvs (20040703) and noticed the count register
is not being used in 64bit:
float bar;
void f1 (void)
{
int i;
for (i = 0; i < 500; i++)
__asm__ __volatile__ ("# %0" : : "f" (i * bar));
}
gives:
.L2:
rldicl. 0,11,0,53
sradi 9,11,53
addi 9,9,1
cmpldi 7,9,2
beq- 0,.L3
xor 0,11,0
blt- 7,.L3
ori 11,0,2048
.L3:
lfs 13,0(10)
std 11,-16(1)
lfd 12,-16(1)
fcfid 12,12
frsp 0,12
fmuls 0,0,13
#APP
# 0
#NO_APP
addi 0,11,1
extsw 11,0
cmpwi 7,11,499
ble+ 7,.L2
--
Summary: Failure to use count register
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anton at samba dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16356
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/16356] Failure to use count register (branch on count register)
2004-07-04 6:15 [Bug c/16356] New: Failure to use count register anton at samba dot org
@ 2004-07-04 7:07 ` pinskia at gcc dot gnu dot org
2004-07-04 19:42 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-04 7:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-04 07:07 -------
This might be a regression though, because the doloop optimization was rewritten for 3.5.0.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Component|c |rtl-optimization
Keywords| |missed-optimization
Summary|Failure to use count |Failure to use count
|register |register (branch on count
| |register)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16356
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/16356] Failure to use count register (branch on count register)
2004-07-04 6:15 [Bug c/16356] New: Failure to use count register anton at samba dot org
2004-07-04 7:07 ` [Bug rtl-optimization/16356] Failure to use count register (branch on count register) pinskia at gcc dot gnu dot org
@ 2004-07-04 19:42 ` pinskia at gcc dot gnu dot org
2004-07-06 1:23 ` rakdver at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-04 19:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-04 19:42 -------
Confirmed, not a regression.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail| |3.4.0 3.5.0
Last reconfirmed|0000-00-00 00:00:00 |2004-07-04 19:42:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16356
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/16356] Failure to use count register (branch on count register)
2004-07-04 6:15 [Bug c/16356] New: Failure to use count register anton at samba dot org
2004-07-04 7:07 ` [Bug rtl-optimization/16356] Failure to use count register (branch on count register) pinskia at gcc dot gnu dot org
2004-07-04 19:42 ` pinskia at gcc dot gnu dot org
@ 2004-07-06 1:23 ` rakdver at gcc dot gnu dot org
2004-11-25 14:08 ` amodra at bigpond dot net dot au
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2004-07-06 1:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rakdver at gcc dot gnu dot org 2004-07-06 01:23 -------
What happens is that some pretty weird stuff is done with the counter of the
loop (reg 119) before it is incremented (later in bb 4), see below. I don't
quite understand what is the code is supposed to do.
The register 119 then of course is not recognized as an induction variable,
and doloop optimization cannot happen.
Zdenek
(insn 17 15 18 1 (parallel [
(set (reg:CC 123)
(compare:CC (and:DI (reg/v:DI 119 [ i ])
(const_int 2047 [0x7ff]))
(const_int 0 [0x0])))
(set (reg:DI 121)
(and:DI (reg/v:DI 119 [ i ])
(const_int 2047 [0x7ff])))
(clobber (scratch:CC))
]) -1 (nil)
(nil))
(insn 18 17 19 1 (set (reg:DI 122)
(ashiftrt:DI (reg/v:DI 119 [ i ])
(const_int 53 [0x35]))) -1 (nil)
(nil))
(insn 19 18 20 1 (set (reg:DI 122)
(plus:DI (reg:DI 122)
(const_int 1 [0x1]))) -1 (nil)
(nil))
(jump_insn 20 19 43 1 (set (pc)
(if_then_else (eq (reg:CC 123)
(const_int 0 [0x0]))
(label_ref 25)
(pc))) -1 (nil)
(expr_list:REG_BR_PROB (const_int 5000 [0x1388])
(nil)))
;; End of basic block 1, registers live:
(nil)
;; Start of basic block 2, registers live: (nil)
(note 43 20 21 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
(insn 21 43 22 2 (set (reg:CCUNS 124)
(compare:CCUNS (reg:DI 122)
(const_int 2 [0x2]))) -1 (nil)
(nil))
(jump_insn 22 21 44 2 (set (pc)
(if_then_else (ltu (reg:CCUNS 124)
(const_int 0 [0x0]))
(label_ref 25)
(pc))) -1 (nil)
(expr_list:REG_BR_PROB (const_int 5000 [0x1388])
(nil)))
;; End of basic block 2, registers live:
(nil)
;; Start of basic block 3, registers live: (nil)
(note 44 22 23 3 [bb 3] NOTE_INSN_BASIC_BLOCK)
(insn 23 44 24 3 (set (reg/v:DI 119 [ i ])
(xor:DI (reg/v:DI 119 [ i ])
(reg:DI 121))) -1 (nil)
(nil))
(insn 24 23 25 3 (set (reg/v:DI 119 [ i ])
(ior:DI (reg/v:DI 119 [ i ])
(const_int 2048 [0x800]))) -1 (nil)
(nil))
;; End of basic block 3, registers live:
(nil)
;; Start of basic block 4, registers live: (nil)
(code_label 25 24 45 4 3 "" [2 uses])
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16356
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/16356] Failure to use count register (branch on count register)
2004-07-04 6:15 [Bug c/16356] New: Failure to use count register anton at samba dot org
` (2 preceding siblings ...)
2004-07-06 1:23 ` rakdver at gcc dot gnu dot org
@ 2004-11-25 14:08 ` amodra at bigpond dot net dot au
2004-11-26 4:38 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-11-25 14:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From amodra at bigpond dot net dot au 2004-11-25 14:08 -------
The "weird stuff" is floatdisf2_internal2. It should be using a new output
register instead of changing its input. Fixing.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |amodra at bigpond dot net
|dot org |dot au
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16356
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/16356] Failure to use count register (branch on count register)
2004-07-04 6:15 [Bug c/16356] New: Failure to use count register anton at samba dot org
` (3 preceding siblings ...)
2004-11-25 14:08 ` amodra at bigpond dot net dot au
@ 2004-11-26 4:38 ` cvs-commit at gcc dot gnu dot org
2004-11-26 4:39 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-26 4:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-11-26 04:38 -------
Subject: Bug 16356
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: amodra@gcc.gnu.org 2004-11-26 04:38:13
Modified files:
gcc : ChangeLog
gcc/config/rs6000: rs6000.md
Log message:
PR rtl-optimization/16356
* config/rs6000/rs6000.md (floatdisf2_internal2): Rewrite with
separate output register and one less jump. Enable for powerpc64.
(floatdisf2): Adjust for above.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6564&r2=2.6565
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&r1=1.334&r2=1.335
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16356
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/16356] Failure to use count register (branch on count register)
2004-07-04 6:15 [Bug c/16356] New: Failure to use count register anton at samba dot org
` (4 preceding siblings ...)
2004-11-26 4:38 ` cvs-commit at gcc dot gnu dot org
@ 2004-11-26 4:39 ` cvs-commit at gcc dot gnu dot org
2004-11-26 4:46 ` amodra at bigpond dot net dot au
2004-11-26 4:48 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-26 4:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-11-26 04:39 -------
Subject: Bug 16356
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: amodra@gcc.gnu.org 2004-11-26 04:38:53
Modified files:
gcc : ChangeLog
gcc/config/rs6000: rs6000.md
Log message:
PR rtl-optimization/16356
* config/rs6000/rs6000.md (floatdisf2_internal2): Rewrite with
separate output register and one less jump. Enable for powerpc64.
(floatdisf2): Adjust for above.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.703&r2=2.2326.2.704
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.284.4.13&r2=1.284.4.14
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16356
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/16356] Failure to use count register (branch on count register)
2004-07-04 6:15 [Bug c/16356] New: Failure to use count register anton at samba dot org
` (5 preceding siblings ...)
2004-11-26 4:39 ` cvs-commit at gcc dot gnu dot org
@ 2004-11-26 4:46 ` amodra at bigpond dot net dot au
2004-11-26 4:48 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-11-26 4:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From amodra at bigpond dot net dot au 2004-11-26 04:46 -------
Fixed mainline and gcc-3.4 branch
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16356
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/16356] Failure to use count register (branch on count register)
2004-07-04 6:15 [Bug c/16356] New: Failure to use count register anton at samba dot org
` (6 preceding siblings ...)
2004-11-26 4:46 ` amodra at bigpond dot net dot au
@ 2004-11-26 4:48 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-26 4:48 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16356
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-11-26 4:48 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-04 6:15 [Bug c/16356] New: Failure to use count register anton at samba dot org
2004-07-04 7:07 ` [Bug rtl-optimization/16356] Failure to use count register (branch on count register) pinskia at gcc dot gnu dot org
2004-07-04 19:42 ` pinskia at gcc dot gnu dot org
2004-07-06 1:23 ` rakdver at gcc dot gnu dot org
2004-11-25 14:08 ` amodra at bigpond dot net dot au
2004-11-26 4:38 ` cvs-commit at gcc dot gnu dot org
2004-11-26 4:39 ` cvs-commit at gcc dot gnu dot org
2004-11-26 4:46 ` amodra at bigpond dot net dot au
2004-11-26 4:48 ` pinskia at gcc dot gnu dot org
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).