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/17381] Unnecessary register move for float extend



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-12-18 02:10 -------
It is even worse with:
double d;
float test1(float fParm)
{
  d = fParm + 1.0;
  return fParm + 1.0f;
}

We get two extra fmr's and one extra load:
_test1:
        fmr f12,f1  <---- extra fmr
        lis r2,ha16(LC1)
        fmr f0,f1  <---- extra fmr
        lfs f13,lo16(LC1)(r2)  <--- load of 1.0f
        lfs f1,lo16(LC1)(r2)  <--- load of 1.0f, extra load
        lis r2,ha16(_d)
        fadd f0,f0,f13
        fadds f1,f12,f1
        stfd f0,lo16(_d)(r2)
        blr


-- 


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


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