------- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-29 04:13 -------
This has been fixed on the trunk for 4.4:
L8:
        movl    40(%esp), %eax
        mull    (%ebp,%ecx,4)
        movl    %eax, 8(%esp)
        addl    %esi, 8(%esp)
        movl    %edx, 12(%esp)
        movl    8(%esp), %edx
        adcl    %edi, 12(%esp)
        movl    12(%esp), %edi
        movl    %edx, (%ebp,%ecx,4)
        addl    $1, %ecx
        movl    %edi, %esi
        xorl    %edi, %edi
        cmpl    %ecx, 36(%esp)
        ja      L8

Note 4.3 produces the old bad code.

fwprop fixes this up from expansion time:
In insn 48, replacing
 (mult:SI (subreg:SI (reg:DI 96) 4)
        (reg:SI 100 [ pretmp.43 ]))
 with (const_int 0 [0x0])
Changed insn 48
deferring rescan insn with uid = 48.

In insn 49, replacing
 (plus:SI (reg:SI 97)
        (reg:SI 98))
 with (reg:SI 97)
Changed insn 49
deferring rescan insn with uid = 49.

Most likely due to:
2008-02-28  Richard Sandiford  <[EMAIL PROTECTED]>

        * simplify-rtx.c (simplify_unary_operation_1): Extend the handling
        of SUBREG_PROMOTED_VAR_P to cope with cases where the extended value
        is smaller than the original promoted value.
        (simplify_subreg): If OP is a SUBREG, try to preserve its
        SUBREG_PROMOTED_VAR_P information.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|c                           |middle-end
           Keywords|                            |missed-optimization
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.0


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

Reply via email to