http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41004
Steven Bosscher <steven at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED Target Milestone|--- |4.8.0 Known to fail| |4.8.0 --- Comment #10 from Steven Bosscher <steven at gcc dot gnu.org> 2012-11-09 21:38:39 UTC --- Resulting code from trunk r193358 primal_update_flow: push {r4, r5, lr} mov r3, #1 mov r4, #0 .L2: cmp r0, r2 beq .L11 ldr r5, [r0] cmp r5, #0 beq .L3 str r4, [r0, #8] b .L4 .L3: str r3, [r0, #8] .L4: ldr r0, [r0, #4] b .L2 .L11: mov r0, #1 .L6: cmp r1, r2 beq .L12 ldr r3, [r1] cmp r3, #0 beq .L7 str r0, [r1, #8] b .L8 .L7: str r3, [r1, #8] .L8: ldr r1, [r1, #4] b .L6 .L12: @ sp needed pop {r4, r5, pc} So the issue of comment #0 is fixed. With "-march=armv7 -mthumb" the stores to "[r0,#8]" and "[r0,#8]" are properly if-converted, I don't see anything that could be improved further. So, fixed.