This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/17019] THUMB -O1: bad code generated for simple for loop
- From: "danfuzz at milk dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Aug 2004 20:07:27 -0000
- Subject: [Bug target/17019] THUMB -O1: bad code generated for simple for loop
- References: <20040813164249.17019.danfuzz@milk.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From danfuzz at milk dot com 2004-08-13 20:07 -------
If I compile with -dP, I find that the bmi instruction gets annotated like this:
@(jump_insn 44 74 72 (parallel [
@ (set (pc)
@ (if_then_else (lt (plus:SI (reg/v:SI 0 r0 [orig:68 a ] [68])
@ (const_int 1 [0x1]))
@ (const_int 0 [0x0]))
@ (label_ref 45)
@ (pc)))
@ (clobber (reg:SI 3 r3))
@ ]) 176 {*addsi3_cbranch_scratch} (insn_list 3 (nil))
@ (expr_list:REG_UNUSED (reg:SI 3 r3)
@ (expr_list:REG_BR_PROB (const_int 3600 [0xe10])
@ (nil))))
@ 0x0004
bmi .L7 @ 44 *addsi3_cbranch_scratch/3 [length = 4]
This seems to correspond to arm.md around line 6211.
Assuming that that is indeed the right pattern to match, then it looks like either there's a missing case
in the switch statement or the which_alternative variable got set incorrectly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17019