This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] More TRUNC_MOD_EXPR folding
- From: Jeffrey A Law <law 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: Fri, 17 Jun 2005 16:34:23 -0600
- Subject: Re: [patch] More TRUNC_MOD_EXPR folding
- References: <kfhhdfw1ykz.fsf@csclub.uwaterloo.ca>
- Reply-to: law at redhat dot com
On Fri, 2005-06-17 at 17:07 -0400, James A. Morrison wrote:
> Hi,
>
> This patch allows signed typed TRUNC_MOD_EXPRs to be folded to AND if the
> value is known to be positive. E.g. abs(x) % 8 -> abs(x) & 7;
>
> Bootstrapped and regtested on ia64-linux with no new regressions, ok for
> mainline?
Umm, it seems to me this ought to be caught by the recent changes
I made to tree-vrp.c. Is there some pressing reason to do this
transformation in multiple places?
Jeff