------- Comment #1 from ramana at gcc dot gnu dot org  2009-12-29 10:35 -------
I can confirm this as a problem on the 4.4 branch and I can see this isn't a
problem on trunk .



        .arch armv5te
        .fpu softvfp
        .eabi_attribute 20, 1
        .eabi_attribute 21, 1
        .eabi_attribute 23, 3
        .eabi_attribute 24, 1
        .eabi_attribute 25, 1
        .eabi_attribute 26, 1
        .eabi_attribute 30, 4
        .eabi_attribute 18, 4
        .code   16
        .file   "t.c"
        .text
        .align  1
        .global test
        .code   16
        .thumb_func
        .type   test, %function
test:
        ldr     r3, .L4
        mov     r2, #0
        str     r2, [r3]
        ldr     r3, .L4+4
        @ sp needed for prologue
        ldr     r2, [r3]
        sub     r3, r2, #1
        sbc     r2, r2, r3
        ldr     r3, .L4+8
        lsl     r2, r2, #1
        strb    r2, [r3]
        bx      lr
.L5:
        .align  2
.L4:
        .word   outcnt
        .word   bool_var
        .word   outbuf
        .size   test, .-test
        .ident  "GCC: (GNU) 4.5.0 20091223 (experimental)"


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-12-29 10:35:21
               date|                            |
            Summary|Regression on dead-code-    |[4.4 only] Regression on
                   |elimination: GCC 4.2.1      |dead-code-elimination: GCC
                   |generates better code than  |4.2.1 generates better code
                   |4.4.0                       |than 4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42494

Reply via email to