This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/15927] THUMB -O2: strength-reduced iteration variable ends up off by 1
- From: "danfuzz at milk dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jun 2004 05:32:21 -0000
- Subject: [Bug rtl-optimization/15927] THUMB -O2: strength-reduced iteration variable ends up off by 1
- References: <20040611003443.15927.danfuzz@milk.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From danfuzz at milk dot com 2004-06-11 05:32 -------
Created an attachment (id=6514)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6514&action=view)
Better C Source
I managed to pare the source down a bit more while still getting the bogus
output, though the register assignments are a little different. Here's the bad
assembly in this version:
ldr r3, [sp, #28]
ldmia r3!, {r2}
ldr r2, [sp, #40]
ldr r5, [r4, #20]
str r3, [sp, #28]
str r3, [sp, #44] // off by one!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15927