aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@cygnus.com>1999-09-24 16:12:44 +0000
committerNick Clifton <nickc@gcc.gnu.org>1999-09-24 16:12:44 +0000
commitaaaec1142d3e7b9174ecd74fd21c6c39d696d56d (patch)
tree0217b67b781fe5d7bd997af8a7c040a4b1db73ae /gcc/combine.c
parent0a16ce6f508d153f21dcc8d33c549e80190137e3 (diff)
downloadgcc-aaaec1142d3e7b9174ecd74fd21c6c39d696d56d.zip
gcc-aaaec1142d3e7b9174ecd74fd21c6c39d696d56d.tar.gz
gcc-aaaec1142d3e7b9174ecd74fd21c6c39d696d56d.tar.bz2
Cope with down shifting a 32 bit constant on a 64 bit host.
From-SVN: r29655
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 0e556db..61d55d0 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -10364,10 +10364,10 @@ simplify_comparison (code, pop0, pop1)
{
/* We must perform a logical shift, not an arithmetic one,
as we want the top N bits of C to be zero. */
- unsigned HOST_WIDE_INT temp = const_op;
+ unsigned HOST_WIDE_INT temp = const_op & GET_MODE_MASK (mode);
temp >>= INTVAL (XEXP (op0, 1));
- op1 = GEN_INT (temp);
+ op1 = GEN_INT (trunc_int_for_mode (temp, mode));
op0 = XEXP (op0, 0);
continue;
}