This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/16803] PowerPC - invariant code motion could be removed from loop.
- From: "nathan at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Nov 2004 17:40:14 -0000
- Subject: [Bug tree-optimization/16803] PowerPC - invariant code motion could be removed from loop.
- References: <20040728170038.16803.steinmtz@us.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From nathan at gcc dot gnu dot org 2004-11-11 17:40 -------
FSF HEAD 2004-11-11 gives better code, with the invariants moved out of the loop,
.main:
ld 9,.LC1@toc(2)
lwz 11,0(9)
addi 11,11,20
extsw 11,11
cmpwi 7,11,0
blt 7,.L2
ld 9,.LC2@toc(2)
li 10,0
li 7,0
ld 8,0(9)
.align 4
.L4:
addi 0,10,1
sldi 9,10,1
extsw 10,0
sthx 7,9,8
cmpw 7,11,10
bge 7,.L4
.L2:
li 3,0
blr
but this has 6 insns in the loop instead of 5. Investigating ...
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |nathan at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16803