This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] PR14796
- From: Richard Henderson <rth at redhat dot com>
- To: "James A. Morrison" <ja2morri at csclub dot uwaterloo dot ca>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 12 Jun 2005 00:47:38 -0700
- Subject: Re: [patch] PR14796
- References: <kfhu0k43vw4.fsf@csclub.uwaterloo.ca>
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~