aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2000-10-25 16:02:14 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-10-25 16:02:14 -0700
commitd4f1c1faff4405a94368214cb84694f9bb250c0c (patch)
tree335353cf74e34d010706540a1812ca0d9f0792ec /gcc
parent47a53f53a8cabd457da63046f6232d392666d00d (diff)
downloadgcc-d4f1c1faff4405a94368214cb84694f9bb250c0c.zip
gcc-d4f1c1faff4405a94368214cb84694f9bb250c0c.tar.gz
gcc-d4f1c1faff4405a94368214cb84694f9bb250c0c.tar.bz2
simplify-rtx.c (simplify_relational_operation): Sign extend low words before sign extending to high words.
* simplify-rtx.c (simplify_relational_operation): Sign extend low words before sign extending to high words. From-SVN: r37061
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/simplify-rtx.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1ddc191..67eebfe 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-10-25 Richard Henderson <rth@redhat.com>
+
+ * simplify-rtx.c (simplify_relational_operation): Sign extend
+ low words before sign extending to high words.
+
2000-10-25 Nick Clifton <nickc@redhat.com>
* config/mcore/mcore.c: Include config.h before system.h.
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 85ce605..648dcb4 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1812,9 +1812,6 @@ simplify_relational_operation (code, mode, op0, op1)
/* If WIDTH is nonzero and smaller than HOST_BITS_PER_WIDE_INT,
we have to sign or zero-extend the values. */
- if (width != 0 && width <= HOST_BITS_PER_WIDE_INT)
- h0u = h1u = 0, h0s = HWI_SIGN_EXTEND (l0s), h1s = HWI_SIGN_EXTEND (l1s);
-
if (width != 0 && width < HOST_BITS_PER_WIDE_INT)
{
l0u &= ((HOST_WIDE_INT) 1 << width) - 1;
@@ -1826,6 +1823,8 @@ simplify_relational_operation (code, mode, op0, op1)
if (l1s & ((HOST_WIDE_INT) 1 << (width - 1)))
l1s |= ((HOST_WIDE_INT) (-1) << width);
}
+ if (width != 0 && width <= HOST_BITS_PER_WIDE_INT)
+ h0u = h1u = 0, h0s = HWI_SIGN_EXTEND (l0s), h1s = HWI_SIGN_EXTEND (l1s);
equal = (h0u == h1u && l0u == l1u);
op0lt = (h0s < h1s || (h0s == h1s && l0u < l1u));