summaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authordougkwan <dougkwan@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-05 09:08:46 +0000
committerdougkwan <dougkwan@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-05 09:08:46 +0000
commit359a1bd5dd6f78bfa5d870ea9103d96947d7496b (patch)
tree4c9459bd6788b618c7453a190aaeecfcf02a4bf2 /gcc/combine.c
parent4e2b0510e06a67be02879f1fb9bde07e7b1b1e0b (diff)
downloadgcc-359a1bd5dd6f78bfa5d870ea9103d96947d7496b.tar.gz
2009-10-05 Doug Kwan <dougkwan@google.com>
PR rtl-optimization/41574 Index: combine.c (distribute_and_simplify_rtx): Quit if RTX mode is floating point and we are not doing unsafe math optimizations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152443 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 35ab576d612..64cf99272da 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -8811,6 +8811,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;