mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 21:15:10 +08:00
Use unsigned shift instead of signed shift.
From-SVN: r29621
This commit is contained in:
parent
f8540d767f
commit
7ce787fe03
@ -1,3 +1,8 @@
|
||||
Thu Sep 23 15:54:12 1999 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* combine.c (simplify_comparison): Use an unsigned shift to adjust
|
||||
the constant.
|
||||
|
||||
Thu Sep 23 08:46:21 1999 Guy Harris <guy@netapp.com>
|
||||
|
||||
* gcc.1: Fix a formatting error.
|
||||
|
@ -10362,8 +10362,12 @@ simplify_comparison (code, pop0, pop1)
|
||||
& ~ (mask >> (INTVAL (XEXP (op0, 1))
|
||||
+ ! equality_comparison_p))) == 0)
|
||||
{
|
||||
const_op >>= INTVAL (XEXP (op0, 1));
|
||||
op1 = GEN_INT (const_op);
|
||||
/* 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;
|
||||
|
||||
temp >>= INTVAL (XEXP (op0, 1));
|
||||
op1 = GEN_INT (temp);
|
||||
op0 = XEXP (op0, 0);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user