From: Doug Kwan Date: Thu, 8 Oct 2009 22:16:58 +0000 (+0000) Subject: re PR rtl-optimization/41574 (Distribute floating point expressions causes bad code... X-Git-Tag: releases/gcc-4.5.0~3021 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=88beb54d682d594a8321394e4103812447ee5dfa;p=thirdparty%2Fgcc.git re PR rtl-optimization/41574 (Distribute floating point expressions causes bad code [4.4 only]) 2009-10-08 Doug Kwan PR rtl-optimization/41574 * gcc.dg/pr41574.c: New test. From-SVN: r152580 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 65e739fe7121..f7872c97995a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-10-08 Doug Kwan + + PR rtl-optimization/41574 + * gcc.dg/pr41574.c: New test. + 2009-10-08 Cary Coutant Add support for debugging with ICF (Identical Code Folding). diff --git a/gcc/testsuite/gcc.dg/pr41574.c b/gcc/testsuite/gcc.dg/pr41574.c new file mode 100644 index 000000000000..f5ddcb2fcc84 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr41574.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fno-unsafe-math-optimizations -fdump-rtl-combine" { target { arm*-*-* } } } */ +/* { dg-options "-O2 -fno-unsafe-math-optimizations -fdump-rtl-combine" { target { ! arm*-*-* } } } */ + + +static const double one=1.0; + +double +f(double x) +{ + return x*(one+x); +} + +/* { dg-final { scan-rtl-dump-not "\\(plus:DF \\(mult:DF" "combine" } } */ +/* { dg-final { cleanup-rtl-dump "combine*" } } */