diff options
author | Jeffrey A Law <law@cygnus.com> | 1997-09-15 21:37:39 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-09-15 15:37:39 -0600 |
commit | 05ef889761d0e3abce59f40c9cfc85fc9488e83c (patch) | |
tree | 8bb90a6d765737a0a23f49ddac65c8f397847b6a | |
parent | dcb9d1f061945e878590b71a063f9a80f7f0d326 (diff) | |
download | gcc-05ef889761d0e3abce59f40c9cfc85fc9488e83c.zip gcc-05ef889761d0e3abce59f40c9cfc85fc9488e83c.tar.gz gcc-05ef889761d0e3abce59f40c9cfc85fc9488e83c.tar.bz2 |
cse.c (simplify_relational_operation): If MODE specifies a mode wider than HOST_WIDE_INT...
* cse.c (simplify_relational_operation): If MODE specifies a
mode wider than HOST_WIDE_INT, then the high word of a CONST_INT
is derived from the sign bit of the low word.
Brought over from r5900 branch.
From-SVN: r15454
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cse.c | 18 |
2 files changed, 22 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7d5badd..f3b148c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Mon Sep 15 15:39:26 1997 Jeffrey A Law (law@cygnus.com) + + * cse.c (simplify_relational_operation): If MODE specifies a + mode wider than HOST_WIDE_INT, then the high word of a CONST_INT + is derived from the sign bit of the low word. + 1997-09-15 Brendan Kehoe <brendan@cygnus.com> * except.c (find_exception_handler_labels): Use xmalloc instead of @@ -4482,7 +4482,14 @@ simplify_relational_operation (code, mode, op0, op1) else { l0u = l0s = INTVAL (op0); - h0u = 0, h0s = l0s < 0 ? -1 : 0; + h0s = l0s < 0 ? -1 : 0; + /* If WIDTH is nonzero and larger than HOST_BITS_PER_WIDE_INT, + then the high word is derived from the sign bit of the low + word, else the high word is zero. */ + if (width != 0 && width > HOST_BITS_PER_WIDE_INT) + h0u = l0s < 0 ? -1 : 0; + else + h0u = 0; } if (GET_CODE (op1) == CONST_DOUBLE) @@ -4493,7 +4500,14 @@ simplify_relational_operation (code, mode, op0, op1) else { l1u = l1s = INTVAL (op1); - h1u = 0, h1s = l1s < 0 ? -1 : 0; + h1s = l1s < 0 ? -1 : 0; + /* If WIDTH is nonzero and larger than HOST_BITS_PER_WIDE_INT, + then the high word is derived from the sign bit of the low + word, else the high word is zero. */ + if (width != 0 && width > HOST_BITS_PER_WIDE_INT) + h1u = l1s < 0 ? -1 : 0; + else + h1u = 0; } /* If WIDTH is nonzero and smaller than HOST_BITS_PER_WIDE_INT, |