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: Mon, 06 Feb 2012 14:08:13 +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
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-02-06
Ever Confirmed|0 |1
--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-02-06 14:08:13 UTC ---
> The above expression computes non-constant
>
> ((ssizetype) (((sizetype) MAX_EXPR <R1b, 0> + 2) * 4) & -4) - (ssizetype)
> ((sizetype) MAX_EXPR <R1b, 0> * 4)
>
> Not sure if such an expression cannot be reliably required to be constant
> in ada though.
Reassociation/simplification of size expressions can generally be done at will.
> Certainly this looks like a missed folding (not sure how often this
> odd BIT_AND_EXPR for sizes happen in Ada).
Quite a lot, but it's created by the folder itself (round_up).