This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/17381] Unnecessary register move for float extend
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Dec 2005 02:10:56 -0000
- Subject: [Bug target/17381] Unnecessary register move for float extend
- References: <bug-17381-327@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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