The attached patch adds a test for the apparently long fixed bug.
FWIW, I've been trying to close out some of these old bugs and while it doesn't seem to be done consistently, it occurs to me that it might be nice to add tests for them. Please let me know if you don't think it's worth the trouble (not just mine but also reviewing the tests and maintaining them). Martin
PR target/17381 - Unnecessary register move for float extend gcc/testsuite/ChangeLog: 2016-01-27 Martin Sebor <mse...@redhat.com> PR target/17381 * gcc.target/powerpc/pr17381.c: New test. Index: gcc/testsuite/gcc.target/powerpc/pr17381.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/pr17381.c (revision 0) +++ gcc/testsuite/gcc.target/powerpc/pr17381.c (working copy) @@ -0,0 +1,11 @@ +/* PR target/17381 - Unnecessary register move for float extend */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +double d; +float test1(float fParm) +{ + d = fParm + 1.0; + return fParm + 1.0f; +} +/* { dg-final { scan-assembler-times "fmr" 1 } } */