diff options
author | Jing Yu <jingyu@google.com> | 2010-01-27 13:22:49 -0800 |
---|---|---|
committer | Jing Yu <jingyu@google.com> | 2010-01-27 13:22:49 -0800 |
commit | 2af1c87cfeb60fe5a05890d13183da7f0c2e8b01 (patch) | |
tree | 1c791a7e0fabfa042f1f748f0ecc5af06784e679 | |
parent | 30f553f6a7597e8084704b84876dea2af493d6fe (diff) | |
download | toolchain_gcc-2af1c87cfeb60fe5a05890d13183da7f0c2e8b01.tar.gz toolchain_gcc-2af1c87cfeb60fe5a05890d13183da7f0c2e8b01.tar.bz2 toolchain_gcc-2af1c87cfeb60fe5a05890d13183da7f0c2e8b01.zip |
Backport upstream patch r152443.
Fix a bug in distribute_and_simplify_rtx in which a floating point mode
RTX is unsafely optimized.
-rw-r--r-- | gcc-4.4.0/README.google | 6 | ||||
-rw-r--r-- | gcc-4.4.0/gcc/combine.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.4.0/README.google b/gcc-4.4.0/README.google index 199418057..e2f11a2e3 100644 --- a/gcc-4.4.0/README.google +++ b/gcc-4.4.0/README.google @@ -2229,3 +2229,9 @@ gcc/testsuite/gcc.c-torture/execute/pr42691.c i2 "set reg const". Owner: jingyu Status: backport from upstream r155948. + +gcc/combine.c + Backport upstream patch r152443. Fix a bug in distribute_and_simplify_rtx + in which a floating point mode RTX is unsafely optimized. + Owner: dougkwan + Status: backport of upstream rev 152443. diff --git a/gcc-4.4.0/gcc/combine.c b/gcc-4.4.0/gcc/combine.c index 0de23fe0f..48ec81c44 100644 --- a/gcc-4.4.0/gcc/combine.c +++ b/gcc-4.4.0/gcc/combine.c @@ -8516,6 +8516,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; |