Re: Use unsigned(-1) for lshift

2013-06-26 Thread Marc Glisse
, 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

Re: Use unsigned(-1) for lshift

2013-05-25 Thread Marc Glisse
On Sat, 25 May 2013, Segher Boessenkool wrote: Index: tree-ssa-structalias.c === --- tree-ssa-structalias.c (revision 199289) +++ tree-ssa-structalias.c (working copy) @@ -475,21 +475,21 @@ struct constraint_expr /*

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Richard Biener
...@inria.fr PR other/57324 * expmed.c (expand_smod_pow2): Use an unsigned -1 for lshift. * fold-const.c (fold_unary_loc): Likewise. * double-int.c (rshift_double, lshift_double): Likewise. * cse.c (cse_insn): Likewise. * tree.c (integer_pow2p

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Marc Glisse
On Fri, 24 May 2013, Richard Biener wrote: On Thu, May 23, 2013 at 9:47 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, this is a simple patch to reduce a bit the noise in PR57324 (undefined behavior flagged by clang). I only handled some of the most obvious ones. Passes

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Richard Biener
On Fri, May 24, 2013 at 10:33 AM, Marc Glisse marc.gli...@inria.fr wrote: On Fri, 24 May 2013, Richard Biener wrote: On Thu, May 23, 2013 at 9:47 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, this is a simple patch to reduce a bit the noise in PR57324 (undefined behavior flagged by

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Jakub Jelinek
On Fri, May 24, 2013 at 10:15:29AM +0200, Richard Biener wrote: On Thu, May 23, 2013 at 9:47 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, this is a simple patch to reduce a bit the noise in PR57324 (undefined behavior flagged by clang). I only handled some of the most obvious ones.

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Marc Glisse
, 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

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Joseph S. Myers
On Fri, 24 May 2013, Richard Biener wrote: On Thu, May 23, 2013 at 9:47 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, this is a simple patch to reduce a bit the noise in PR57324 (undefined behavior flagged by clang). I only handled some of the most obvious ones. Passes

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Segher Boessenkool
Index: tree-ssa-structalias.c === --- tree-ssa-structalias.c (revision 199289) +++ tree-ssa-structalias.c (working copy) @@ -475,21 +475,21 @@ struct constraint_expr /* Offset, in bits, of this constraint from the

Use unsigned(-1) for lshift

2013-05-23 Thread Marc Glisse
(expand_smod_pow2): Use an unsigned -1 for lshift. * fold-const.c (fold_unary_loc): Likewise. * double-int.c (rshift_double, lshift_double): Likewise. * cse.c (cse_insn): Likewise. * tree.c (integer_pow2p, tree_log2, tree_floor_log2): Likewise. * tree-ssa