This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/30961] [4.1/4.2/4.3 regression] redundant reg/mem stores/moves



------- Comment #25 from pluto at agmk dot net  2007-08-07 17:51 -------
(In reply to comment #24)
> (In reply to comment #23)
> > (In reply to comment #22)
> > > There are 2 issues, convert and load. They may be caused by different
> > > patches and should be tracked separately when doing binary search.
> > 
> > i've filled the 'load' issue as PR33008.
> > the gcc-reload-second-2.patch fixes 'convert' and finally this PR.
> > 
> 
> Which checkin caused the convert regression?

i don't know but the 'convert' issue is almost fixed.
gcc-4.2 patched against PR27567 and gcc-reload-second-2.patch produces:

float convert_int2float( int in )
{
        float f;
        __builtin_memcpy( &f, &in, sizeof( f ) );
        return f;
}

double convert_long2double( long in )
{
        double f;
        __builtin_memcpy( &f, &in, sizeof( f ) );
        return f;
}

{-m64 -O2}

convert_int2float:
        movl    %edi, -4(%rsp)
        movss   -4(%rsp), %xmm0
        ret

convert_long2double:
        movq    %rdi, -8(%rsp)
        movsd   -8(%rsp), %xmm1  <== reload-second patch doesn't work here.
        movapd  %xmm1, %xmm0     <== /
        ret

{-m32 -O2 -fomit-frame-pointer}

convert_int2float:
        flds    4(%esp)
        ret

convert_long2double:
        fldl    4(%esp)
        ret


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]