This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] PR14796


On Sun, Jun 12, 2005 at 02:57:15AM -0400, James A. Morrison wrote:
> 	* fold-const.c (fold_binary): Transform (A >> C) << C into
> 	one BIT_AND_EXPR.
> 	<shift>: Transform (A OP c1) OP c2 into A OP (c1 + c2).

Ok.

> +      /* Transform (x >> c) << c into x & (-1<<c)  */

(x << c) >> c, with unsigned >>, is reducible to a single mask as well.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]