summaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-23 22:16:08 +0000
committerglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-23 22:16:08 +0000
commit561f0ec8cf3b0a2b13ed7561b6d4af44ea96190d (patch)
treefd1a5007e3c6c876ebf4f1982aa74584d82afc0d /gcc/expmed.c
parent66d5aa8e94ffe60746b0032942967ea052e199e0 (diff)
downloadgcc-561f0ec8cf3b0a2b13ed7561b6d4af44ea96190d.tar.gz
2013-08-24 Marc Glisse <marc.glisse@inria.fr>
PR other/57324 * hwint.h (HOST_WIDE_INT_UC, HOST_WIDE_INT_1U, HOST_WIDE_INT_M1, HOST_WIDE_INT_M1U): New macros. * fold-const.c (sign_bit_p, build_range_check, fold_unary_loc, fold_binary_loc, fold_ternary_loc): Use the new macros. Use an unsigned -1 for lshift. * cse.c (cse_insn): Likewise. * double-int.c (rshift_double, lshift_double): Likewise. * builtins.c (fold_builtin_bitop): Likewise. * combine.c (force_to_mode): Likewise. * tree.c (integer_pow2p, tree_log2, tree_floor_log2): Likewise. * simplify-rtx.c (simplify_const_unary_operation, simplify_const_binary_operation): Likewise. * tree-stdarg.c (va_list_counter_bump, va_list_ptr_read, check_va_list_escapes): Likewise. * rtlanal.c (nonzero_bits1): Likewise. * expmed.c (expand_smod_pow2): Likewise. * tree-ssa-structalias.c (UNKNOWN_OFFSET): Use HOST_WIDE_INT_MIN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201953 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 79f3424961d..d18f09f4889 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -3697,11 +3697,11 @@ expand_smod_pow2 (enum machine_mode mode, rtx op0, HOST_WIDE_INT d)
masklow = ((HOST_WIDE_INT) 1 << logd) - 1;
if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT)
{
- masklow |= (HOST_WIDE_INT) -1 << (GET_MODE_BITSIZE (mode) - 1);
+ masklow |= HOST_WIDE_INT_M1U << (GET_MODE_BITSIZE (mode) - 1);
maskhigh = -1;
}
else
- maskhigh = (HOST_WIDE_INT) -1
+ maskhigh = HOST_WIDE_INT_M1U
<< (GET_MODE_BITSIZE (mode) - HOST_BITS_PER_WIDE_INT - 1);
temp = expand_binop (mode, and_optab, op0,
@@ -3715,7 +3715,7 @@ expand_smod_pow2 (enum machine_mode mode, rtx op0, HOST_WIDE_INT d)
temp = expand_binop (mode, sub_optab, result, const1_rtx, result,
0, OPTAB_LIB_WIDEN);
- masklow = (HOST_WIDE_INT) -1 << logd;
+ masklow = HOST_WIDE_INT_M1U << logd;
maskhigh = -1;
temp = expand_binop (mode, ior_optab, temp,
immed_double_const (masklow, maskhigh, mode),