diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1998-02-02 00:37:25 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-02-01 17:37:25 -0700 |
commit | 460f50dc1470348f6b74a4e73559d867aae534ee (patch) | |
tree | a3013bffcccea80f70ae3c665b74e000c37a43f4 /gcc/loop.c | |
parent | db771a3c538387b54ea122095cdb05ce92d0724f (diff) | |
download | gcc-460f50dc1470348f6b74a4e73559d867aae534ee.zip gcc-460f50dc1470348f6b74a4e73559d867aae534ee.tar.gz gcc-460f50dc1470348f6b74a4e73559d867aae534ee.tar.bz2 |
* loop.c (get_condition): Handle sign-extended constants.
From-SVN: r17590
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -7075,15 +7075,17 @@ get_condition (jump, earliest) code = LT, op1 = GEN_INT (const_val + 1); break; + /* When cross-compiling, const_val might be sign-extended from + BITS_PER_WORD to HOST_BITS_PER_WIDE_INT */ case GE: - if (const_val + if ((const_val & max_val) != (((HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (GET_MODE (op0)) - 1)))) code = GT, op1 = GEN_INT (const_val - 1); break; case LEU: - if (uconst_val != max_val) + if (uconst_val < max_val) code = LTU, op1 = GEN_INT (uconst_val + 1); break; |