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: "rguenth 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 13:47:43 +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 #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-13 13:47:43 UTC ---
Author: rguenth
Date: Tue Mar 13 13:47:35 2012
New Revision: 185334
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185334
Log:
2012-03-13 Richard Guenther <rguenther@suse.de>
PR middle-end/52134
* fold-const.c (fold_binary_loc): Fold (X * Y) & -(1 << CST) to X * Y
if Y is a constant multiple of 1 << CST.
* gcc.dg/pr52134.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/pr52134.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog