This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/39837] [4.3/4.4/4.5 regression] extra spills due to RTL LICM
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2010 23:11:38 -0000
- Subject: [Bug rtl-optimization/39837] [4.3/4.4/4.5 regression] extra spills due to RTL LICM
- References: <bug-39837-17592@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from steven at gcc dot gnu dot org 2010-01-29 23:11 -------
Created an attachment (id=19755)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19755&action=view)
Hack to look for invariants inside MEMs
Re. comment #4:
The following code would also be correct, right?
test:
push {r4, lr}
sub sp, sp, #8
mov r3, #0
add r4, sp, #4
str r3, [sp, #4]
.L2:
mov r0, r4
bl func
ldr r3, [r4]
cmp r3, #12
ble .L2
add sp, sp, #8
@ sp needed for prologue
pop {r4, pc}
.size test, .-test
.ident "GCC: (GNU) 4.5.0 20100129 (experimental) [trunk revision
156352]"
I have a really bad hack that makes loop-invariant look at addresses inside
MEMs (attached).
(Looking at Zdenek:) Would something like this in a more polished and actually
verified&tested form be a good idea?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39837