aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-08-27 17:59:33 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-08-27 17:59:33 -0700
commitfa4e13e0355e5e50f96bde424b27555aa2630527 (patch)
tree6b8a104dc4b6fdee45fd6b600c6123feb302b391 /gcc/combine.c
parentc05148e8416eb843208a5866ee02f3287a29685c (diff)
downloadgcc-fa4e13e0355e5e50f96bde424b27555aa2630527.zip
gcc-fa4e13e0355e5e50f96bde424b27555aa2630527.tar.gz
gcc-fa4e13e0355e5e50f96bde424b27555aa2630527.tar.bz2
combine.c (combine_simplify_rtx): Don't reverse condition if there is no reverse for the condition.
* combine.c (combine_simplify_rtx): Don't reverse condition if there is no reverse for the condition. (simplify_comparison): Don't simplify subregs from INT to FP. * gcc.c-torture/execute/ieee/fp-cmp-4.c (main): Make "data" static. * gcc.c-torture/execute/ieee/fp-cmp-5.c: New. From-SVN: r45220
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index d110284..78bf6ce 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3636,7 +3636,8 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
just make the comparison operation. */
if (true_rtx == const_true_rtx && false_rtx == const0_rtx)
x = gen_binary (cond_code, mode, cond, cop1);
- else if (true_rtx == const0_rtx && false_rtx == const_true_rtx)
+ else if (true_rtx == const0_rtx && false_rtx == const_true_rtx
+ && reverse_condition (cond_code) != UNKNOWN)
x = gen_binary (reverse_condition (cond_code),
mode, cond, cop1);
@@ -10828,6 +10829,7 @@ simplify_comparison (code, pop0, pop1)
if (GET_CODE (op0) == SUBREG && subreg_lowpart_p (op0)
&& GET_MODE_CLASS (GET_MODE (op0)) == MODE_INT
+ && GET_MODE_CLASS (GET_MODE (SUBREG_REG (op0))) == MODE_INT
&& (code == NE || code == EQ)
&& ((GET_MODE_SIZE (GET_MODE (op0))
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (op0))))))
@@ -10838,6 +10840,7 @@ simplify_comparison (code, pop0, pop1)
else if (GET_CODE (op0) == SUBREG && subreg_lowpart_p (op0)
&& GET_MODE_CLASS (GET_MODE (op0)) == MODE_INT
+ && GET_MODE_CLASS (GET_MODE (SUBREG_REG (op0))) == MODE_INT
&& (code == NE || code == EQ)
&& (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0)))
<= HOST_BITS_PER_WIDE_INT)