diff options
| author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-11 13:53:39 +0000 |
|---|---|---|
| committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-11 13:53:39 +0000 |
| commit | f58bb90b0b44325df920a83bf6270ea330df0c20 (patch) | |
| tree | 1e2fae2e0119b871ed90d12f751e83b202e8ae81 | |
| parent | 63bebd1832125714446541ead84f89ce713e41dd (diff) | |
| download | ppe42-gcc-f58bb90b0b44325df920a83bf6270ea330df0c20.tar.gz ppe42-gcc-f58bb90b0b44325df920a83bf6270ea330df0c20.zip | |
* combine.c (apply_distributive_law): Enable "distributive" floating
point optimizations with -funsafe-math-optimizations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72334 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/combine.c | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f24744b75b6..f5bec024a80 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-10-11 Roger Sayle <roger@eyesopen.com> + + * combine.c (apply_distributive_law): Enable "distributive" floating + point optimizations with -funsafe-math-optimizations. + 2003-10-11 Andrew Pinski <pinskia@physics.uc.edu> * genmodes.c (emit_mode_mask) Change MASK to MODE_MASK. diff --git a/gcc/combine.c b/gcc/combine.c index 1ac2851d63c..0a65bf221a8 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7791,14 +7791,14 @@ static rtx apply_distributive_law (rtx x) { enum rtx_code code = GET_CODE (x); + enum rtx_code inner_code; rtx lhs, rhs, other; rtx tem; - enum rtx_code inner_code; - /* Distributivity is not true for floating point. - It can change the value. So don't do it. - -- rms and moshier@world.std.com. */ - if (FLOAT_MODE_P (GET_MODE (x))) + /* 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 x; /* The outer operation can only be one of the following: */ @@ -7806,7 +7806,8 @@ apply_distributive_law (rtx x) && code != PLUS && code != MINUS) return x; - lhs = XEXP (x, 0), rhs = XEXP (x, 1); + lhs = XEXP (x, 0); + rhs = XEXP (x, 1); /* If either operand is a primitive we can't do anything, so get out fast. */ |

