Fix PR41574 on 4.4 branch.
2009-12-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> 2009-10-05 Doug Kwan <dougkwan@google.com> PR rtl-optimization/41574 * combine.c (distribute_and_simplify_rtx): Quit if RTX mode is floating point and we are not doing unsafe math optimizations. 2009-12-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> 2009-10-08 Doug Kwan <dougkwan@google.com> PR rtl-optimization/41574 * gcc.dg/pr41574.c: New test. From-SVN: r155157
This commit is contained in:
parent
1c8b0b14e3
commit
c2f2791fc5
|
@ -1,5 +1,13 @@
|
|||
2009-12-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
|
||||
|
||||
2009-10-05 Doug Kwan <dougkwan@google.com>
|
||||
|
||||
PR rtl-optimization/41574
|
||||
* combine.c (distribute_and_simplify_rtx): Quit if RTX mode is
|
||||
floating point and we are not doing unsafe math optimizations.
|
||||
|
||||
2009-12-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
|
||||
|
||||
PR target/41939
|
||||
Backport from mainline:
|
||||
2009-06-05 Julian Brown <julian@codesourcery.com>
|
||||
|
|
|
@ -8512,6 +8512,12 @@ distribute_and_simplify_rtx (rtx x, int n)
|
|||
enum rtx_code outer_code, inner_code;
|
||||
rtx decomposed, distributed, inner_op0, inner_op1, new_op0, new_op1, tmp;
|
||||
|
||||
/* Distributivity is not true for floating point as it can change the
|
||||
value. So we don't do it unless -funsafe-math-optimizations. */
|
||||
if (FLOAT_MODE_P (GET_MODE (x))
|
||||
&& ! flag_unsafe_math_optimizations)
|
||||
return NULL_RTX;
|
||||
|
||||
decomposed = XEXP (x, n);
|
||||
if (!ARITHMETIC_P (decomposed))
|
||||
return NULL_RTX;
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2009-12-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
|
||||
|
||||
2009-10-08 Doug Kwan <dougkwan@google.com>
|
||||
|
||||
PR rtl-optimization/41574
|
||||
* gcc.dg/pr41574.c: New test.
|
||||
|
||||
2009-11-13 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/27425
|
||||
|
|
|
@ -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*" } } */
|
Loading…
Reference in New Issue