This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix for le.f failure
- To: gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>
- Subject: fix for le.f failure
- From: Geoffrey Keating <geoffk at thief dot cygnus dot com>
- Date: Sun, 14 Jan 2001 01:45:16 -0800
This patch fixes another bug introduced by Jan's patch:
Fri Jan 12 00:04:00 MET 2001 Jan Hubicka <jh@suse.cz>
...
* combine.c (REVERSIBLE_CC_MODE): Remove.
(reversible_comparison_p): Remove.
(combine_reversed_comparison_code): New.
(reversed_comparison): New.
(combine_simplify_rtx): Use
combine_reversed_comparison_code/reversed_comparison instead
of reversible_comparison_p.
(simplify_if_then_else): Likewise.
(simplify_set): Likewise.
(simplify_logical): Likewise.
(if_then_else_cond): Likewise.
(known_cond): Likewise.
(simplify_comparison): Likewise.
that the regression tester showed up as
FAIL: g77.f-torture/execute/le.f compilation, -O1
Patch attached. Tested on powerpc-eabisim; I'll commit when an
x86-linux bootstrap finishes.
--
Geoff Keating <geoffk@redhat.com>
===File ~/patches/gcc-jancombinebug.patch===================
2001-01-14 Geoffrey Keating <geoffk@redhat.com>
* combine.c (simplify_comparison): Don't change `code' when
can't reverse comparison.
Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.175
diff -u -p -r1.175 combine.c
--- combine.c 2001/01/12 11:12:34 1.175
+++ combine.c 2001/01/14 09:36:41
@@ -10710,13 +10710,19 @@ simplify_comparison (code, pop0, pop1)
&& (STORE_FLAG_VALUE
& (((HOST_WIDE_INT) 1
<< (GET_MODE_BITSIZE (GET_MODE (op0)) - 1))))
- && (code == LT || (code == GE))))
+ && (code == LT || code == GE)))
{
- code = (code == LT || code == NE
- ? GET_CODE (op0) : combine_reversed_comparison_code (op0));
- if (code != UNKNOWN)
+ enum rtx_code new_code;
+ if (code == LT || code == NE)
+ new_code = GET_CODE (op0);
+ else
+ new_code = combine_reversed_comparison_code (op0);
+
+ if (new_code != UNKNOWN)
{
- op0 = tem, op1 = tem1;
+ code = new_code;
+ op0 = tem;
+ op1 = tem1;
continue;
}
}
============================================================