aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>2001-12-10 22:52:26 +0000
committerJeff Law <law@gcc.gnu.org>2001-12-10 15:52:26 -0700
commit805f169411c36a862b57cc888038b03424dbfb0c (patch)
tree62b2bc534406191558e8d82da9b25d635b405911 /gcc/combine.c
parent9aaceb4b3e161bc4ce5d2265bf6d3a95d1e62d66 (diff)
downloadgcc-805f169411c36a862b57cc888038b03424dbfb0c.zip
gcc-805f169411c36a862b57cc888038b03424dbfb0c.tar.gz
gcc-805f169411c36a862b57cc888038b03424dbfb0c.tar.bz2
combine.c (known_cond): Check mode of each operand to determine if COND is comparing floating point values.
* combine.c (known_cond): Check mode of each operand to determine if COND is comparing floating point values. From-SVN: r47855
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index ee27919..0e15def 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -7351,8 +7351,14 @@ known_cond (x, cond, reg, val)
if (side_effects_p (x))
return x;
- if (cond == EQ && rtx_equal_p (x, reg) && !FLOAT_MODE_P (cond))
+ /* If either operand of the condition is a floating point value,
+ then we have to avoid collapsing an EQ comparison. */
+ if (cond == EQ
+ && rtx_equal_p (x, reg)
+ && ! FLOAT_MODE_P (GET_MODE (x))
+ && ! FLOAT_MODE_P (GET_MODE (val)))
return val;
+
if (cond == UNEQ && rtx_equal_p (x, reg))
return val;