aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@redhat.com>2001-01-14 10:39:49 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2001-01-14 10:39:49 +0000
commitaa6683f7f16af36263b28faf4cfc947cf4304c97 (patch)
treecaf19a4bf9883cf30f48c46a4ee9758d16695234 /gcc/combine.c
parentfce7e199d55908fa9fcaf9613b8f08da0fdcdece (diff)
downloadgcc-aa6683f7f16af36263b28faf4cfc947cf4304c97.zip
gcc-aa6683f7f16af36263b28faf4cfc947cf4304c97.tar.gz
gcc-aa6683f7f16af36263b28faf4cfc947cf4304c97.tar.bz2
combine.c (simplify_comparison): Don't change `code' when can't reverse comparison.
* combine.c (simplify_comparison): Don't change `code' when can't reverse comparison. From-SVN: r39007
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 055cfc3..30b13c8 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -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;
}
}