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 other/26902] New: missed optimization during x87 args load.


double plus_1( double x )
{
    asm volatile
    (
        "fadd %2"
        : "=t" (x)
        : "0" (x), "u" (1.0)
    );
    return x;
}

with -fomit-frame-pointer gcc produces:

plus_1:
        fldl    4(%esp)     \
        fld1                 |- why just not "fld1 ; fldl 4(%esp)" ?
        fxch    %st(1)      /
#APP
        fadd %st(1)
#NO_APP
        fstp    %st(1)
        ret


-- 
           Summary: missed optimization during x87 args load.
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pluto at agmk dot net
 GCC build triplet: i686-pld-linux
  GCC host triplet: i686-pld-linux
GCC target triplet: i686-pld-linux


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


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