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

--- Comment #8 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-07-09 
16:45:20 UTC ---
Created attachment 24727
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24727
C file, reduced test case

Compiler with avr-gcc 4.6.1 -Os -S -fno-split-wide-types -dp

to get:

func_1:
    push r8     ;  94    *pushqi/1    [length = 1]
    push r9     ;  95    *pushqi/1    [length = 1]
    push r10     ;  96    *pushqi/1    [length = 1]
    push r11     ;  97    *pushqi/1    [length = 1]
    push r12     ;  98    *pushqi/1    [length = 1]
    push r13     ;  99    *pushqi/1    [length = 1]
    push r14     ;  100    *pushqi/1    [length = 1]
    push r15     ;  101    *pushqi/1    [length = 1]
    clr r8     ;  3    *movqi/1    [length = 1]
.L2:
    lds r24,g_52     ;  15    *movqi/4    [length = 2]
    subi r24,lo8(-(1))     ;  16    addqi3/2    [length = 1]
    sts g_52,r24     ;  17    *movqi/3    [length = 2]
    mov r24,r8     ;  19    *movqi/1    [length = 1]
    ldi r22,lo8(3)     ;  20    *movqi/2    [length = 1]
    rcall foo     ;  21    call_value_insn/3    [length = 1]
    mov r8,r24     ;  23    *movqi/1    [length = 1]
>>>> BUG START
    lsl r24     ;  24    ashrqi3/5    [length = 2]
    sbc r24,r24
    brne .L1     ;  34    branch    [length = 1]
>>>> BUG END
    tst r24     ;  37    *cmpqi/1    [length = 1]
    brne .L1     ;  38    branch    [length = 1]
    tst r24     ;  41    *cmpqi/1    [length = 1]
    brne .L1     ;  42    branch    [length = 1]
    tst r24     ;  45    *cmpqi/1    [length = 1]
    brne .L1     ;  46    branch    [length = 1]
    tst r24     ;  49    *cmpqi/1    [length = 1]
    brne .L1     ;  50    branch    [length = 1]
    tst r24     ;  53    *cmpqi/1    [length = 1]
    brne .L1     ;  54    branch    [length = 1]
    tst r24     ;  57    *cmpqi/1    [length = 1]
    brne .L1     ;  58    branch    [length = 1]
    ldi r24,lo8(12)     ;  93    *movqi/2    [length = 1]
    cp r24,r8     ;  61    *cmpqi/2    [length = 1]
    brsh .L2     ;  62    branch    [length = 1]
.L1:
    pop r15     ;  104    popqi    [length = 1]
    pop r14     ;  105    popqi    [length = 1]
    pop r13     ;  106    popqi    [length = 1]
    pop r12     ;  107    popqi    [length = 1]
    pop r11     ;  108    popqi    [length = 1]
    pop r10     ;  109    popqi    [length = 1]
    pop r9     ;  110    popqi    [length = 1]
    pop r8     ;  111    popqi    [length = 1]
    ret     ;  112    return_from_epilogue    [length = 1]

Reply via email to