Message ID | 56A946D5.3030106@gmail.com |
---|---|
State | New |
Headers | show |
On 01/27/2016 03:38 PM, Martin Sebor wrote: > 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). I suspect it's more oversight than anything. And if an old bug isn't on the regression lists, it doesn't tend to get much attention. I'm all for adding the regression tests and getting this stuff closed out. I'll let the PPC maintainers weigh in on the actual test, but my inclination would be to include it if it works across the various PPC targets. jeff
On Wed, Jan 27, 2016 at 5:38 PM, Martin Sebor <msebor@gmail.com> wrote: > 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). Assuming this passes, the additional test is okay. Thanks, David
PR target/17381 - Unnecessary register move for float extend gcc/testsuite/ChangeLog: 2016-01-27 Martin Sebor <msebor@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 } } */