From 88beb54d682d594a8321394e4103812447ee5dfa Mon Sep 17 00:00:00 2001 From: Doug Kwan Date: Thu, 8 Oct 2009 22:16:58 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr41574.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr41574.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 65e739fe712..f7872c97995 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 00000000000..f5ddcb2fcc8 --- /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*" } } */ -- 2.30.2