diff options
author | Jing Yu <jingyu@google.com> | 2009-11-18 17:41:15 -0800 |
---|---|---|
committer | Jing Yu <jingyu@google.com> | 2009-11-18 17:41:15 -0800 |
commit | 727407e24af9df776e77f6a5762a62869198bc09 (patch) | |
tree | 678cb9a9c09bc6de817a4469ce205c26fa741fd8 /gcc-4.4.0/gcc/combine.c | |
parent | df62c1c110e8532b995b23540b7e3695729c0779 (diff) | |
download | toolchain_gcc-727407e24af9df776e77f6a5762a62869198bc09.tar.gz toolchain_gcc-727407e24af9df776e77f6a5762a62869198bc09.tar.bz2 toolchain_gcc-727407e24af9df776e77f6a5762a62869198bc09.zip |
Gcc source for prebuilt toolchains in Eclair-mr2.
The patch mainly fixes a unsafe floating point combination bug.
Diffstat (limited to 'gcc-4.4.0/gcc/combine.c')
-rw-r--r-- | gcc-4.4.0/gcc/combine.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc-4.4.0/gcc/combine.c b/gcc-4.4.0/gcc/combine.c index 70c1e5d3d..5bffb5845 100644 --- a/gcc-4.4.0/gcc/combine.c +++ b/gcc-4.4.0/gcc/combine.c @@ -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; |