https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67391

            Bug ID: 67391
           Summary: [SH] Convert clrt addc to normal add insn
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olegendo at gcc dot gnu.org
  Target Milestone: ---

Looking through bzip2 compress.c of the CSiBE set, I've spotted sequences such
as:

        mov     r15,r4
        add     #64,r4
        mov.l   @(44,r4),r2
        mov     r15,r0
        mov.w   .L615,r5
        add     #124,r0
        clrt                 <<<
        mov.l   @(16,r0),r0
        mov     r14,r1
        add     r2,r5
        addc    r12,r1       <<<
        mov.l   r5,@(44,r4)
        cmp/eq  r1,r0        <<<
        bf/s    .L126

It seems that this is a left-over of what originally was a 64 bit addition. 
The high word of the 64 bit add result is unused, which makes it effectively a
32 bit addition.  The clrt can be removed and the addc can be converted into a
regular add insn.

Reply via email to