summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-17 08:41:05 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-17 08:41:05 +0000
commitbf74200c1ce7629e4709746d49ff57ec7052b8d4 (patch)
treeb78d162dd68eb8daa39ce376a44c7a1347b5e8cb
parent03c576d01bcd72aa486f18e2c5347bdc70d074c8 (diff)
downloadppe42-gcc-bf74200c1ce7629e4709746d49ff57ec7052b8d4.tar.gz
ppe42-gcc-bf74200c1ce7629e4709746d49ff57ec7052b8d4.zip
* simplify-rtx.c (simplify_relational_operation): Two signed
values with equal high words are less/greater than each other if their low words are less/greater when considered as unsigned. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35080 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/simplify-rtx.c4
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20000717-2.c11
4 files changed, 23 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 163e83e6ecd..0d81edd8424 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2000-07-17 Geoffrey Keating <geoffk@cygnus.com>
+
+ * simplify-rtx.c (simplify_relational_operation): Two signed
+ values with equal high words are less/greater than each other if
+ their low words are less/greater when considered as unsigned.
+
Mon Jul 17 02:37:06 2000 Marc Espie <espie@openbsd.org>
* configure.in (vax-*-openbsd): Change to new style configuration,
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 4a7a3a67861..7426949456d 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1792,8 +1792,8 @@ simplify_relational_operation (code, mode, op0, op1)
}
equal = (h0u == h1u && l0u == l1u);
- op0lt = (h0s < h1s || (h0s == h1s && l0s < l1s));
- op1lt = (h1s < h0s || (h1s == h0s && l1s < l0s));
+ op0lt = (h0s < h1s || (h0s == h1s && l0u < l1u));
+ op1lt = (h1s < h0s || (h1s == h0s && l1u < l0u));
op0ltu = (h0u < h1u || (h0u == h1u && l0u < l1u));
op1ltu = (h1u < h0u || (h1u == h0u && l1u < l0u));
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5fd67e3f1a4..6c7e322fef8 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2000-07-17 Geoffrey Keating <geoffk@cygnus.com>
+
+ * gcc.c-torture/execute/20000717-2.c: New test.
+
2000-07-17 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc.dg/c90-digraph-1.c, gcc.dg/c94-digraph.c,
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000717-2.c b/gcc/testsuite/gcc.c-torture/execute/20000717-2.c
new file mode 100644
index 00000000000..4db9032ec6c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20000717-2.c
@@ -0,0 +1,11 @@
+static void
+compare (long long foo)
+{
+ if (foo < 4294967297LL)
+ abort();
+}
+int main(void)
+{
+ compare (8589934591LL);
+ exit (0);
+}
OpenPOWER on IntegriCloud