+2002-05-06 Roger Sayle <roger@eyesopen.com>
+
+ * fold-const.c (lshift-double): Cast the high word to an unsigned
+ HOST_WIDE_INT when extracting sign bit to avoid compiler warning.
+ (div_and_round_double): Cast carry to a signed HOST_WIDE_INT to
+ avoid compiler warning. (fold): Remove redundant code from
+ BIT_AND_EXPR as integer operands are canonicalized to be arg1.
+
2002-05-06 Jeff Law <law@redhat.com>
* pa-protos.h (hppa_fpstore_bypass_p): Declare.
/* Sign extend all bits that are beyond the precision. */
signmask = -((prec > HOST_BITS_PER_WIDE_INT
- ? (*hv >> (prec - HOST_BITS_PER_WIDE_INT - 1))
+ ? ((unsigned HOST_WIDE_INT) *hv
+ >> (prec - HOST_BITS_PER_WIDE_INT - 1))
: (*lv >> (prec - 1))) & 1);
if (prec >= 2 * HOST_BITS_PER_WIDE_INT)
/* If quo_est was high by one, then num[i] went negative and
we need to correct things. */
- if (num[num_hi_sig] < carry)
+ if (num[num_hi_sig] < (HOST_WIDE_INT) carry)
{
quo_est--;
carry = 0; /* add divisor back in */
if (t1 != NULL_TREE)
return t1;
/* Simplify ((int)c & 0x377) into (int)c, if c is unsigned char. */
- if (TREE_CODE (arg0) == INTEGER_CST && TREE_CODE (arg1) == NOP_EXPR
- && TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (arg1, 0))))
- {
- unsigned int prec
- = TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (arg1, 0)));
-
- if (prec < BITS_PER_WORD && prec < HOST_BITS_PER_WIDE_INT
- && (~TREE_INT_CST_LOW (arg0)
- & (((HOST_WIDE_INT) 1 << prec) - 1)) == 0)
- return build1 (NOP_EXPR, type, TREE_OPERAND (arg1, 0));
- }
if (TREE_CODE (arg1) == INTEGER_CST && TREE_CODE (arg0) == NOP_EXPR
&& TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (arg0, 0))))
{