This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/67351] Missed optimisation on 64-bit field compared to 32-bit
- From: "naveenh at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 Sep 2015 10:20:35 +0000
- Subject: [Bug tree-optimization/67351] Missed optimisation on 64-bit field compared to 32-bit
- Auto-submitted: auto-generated
- References: <bug-67351-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67351
--- Comment #9 from naveenh at gcc dot gnu.org ---
Author: naveenh
Date: Thu Sep 3 10:20:03 2015
New Revision: 227432
URL: https://gcc.gnu.org/viewcvs?rev=227432&root=gcc&view=rev
Log:
2015-09-03 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
PR middle-end/67351
gcc/ChangeLog:
* fold-const.c (fold_binary_loc) : Move
Transform (x >> c) << c into x & (-1<<c) or
transform (x << c) >> c into x & ((unsigned)-1 >> c) for unsigned
types using simplify and match.
* match.pd (lshift (rshift @0 INTEGER_CST@1) @1) : New simplifier.
(rshift (lshift @0 INTEGER_CST@1) @1) : New Simplifier.
gcc/testsuite/ChangeLog:
* g++.dg/pr66752-2.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/pr67351.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog