This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/31261] Missed tree optimizations: (8 - (x & 7)) & 7


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31261

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-09-30 19:21:44 UTC ---
Author: jakub
Date: Thu Sep 30 19:21:34 2010
New Revision: 164761

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164761
Log:
    PR tree-optimization/31261
    * fold-const.c (fold_binary): Optimize ((A & N) + B) & M
    for constants M and N, M == (1LL << cst) - 1 && (N & M) == M.

    * gcc.dg/tree-ssa/pr31261.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr31261.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]