This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/52134] Does not fold (x * 4) & -4
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Mar 2012 22:17:35 +0000
- Subject: [Bug middle-end/52134] Does not fold (x * 4) & -4
- Auto-submitted: auto-generated
- References: <bug-52134-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52134
--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-03-13 22:17:35 UTC ---
> See how the lattice's already have its last 3 bits unset. In fact I think we
> should only do this in the ccp/vrp passes to remove the & rather than fold.
For size calculations (TYPE_IS_SIZETYPE) the earlier you fold, the better, so
that you don't have to drag huge expressions for variable-sized types in the
FE.