From fa4e13e0355e5e50f96bde424b27555aa2630527 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 27 Aug 2001 17:59:33 -0700 Subject: 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 --- gcc/combine.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/combine.c') 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) -- cgit v1.1