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



------- Comment #4 from trt at acm dot org  2007-03-21 18:28 -------
I think this could be generalized to more operators, e.g. 

     (y | (x & 7)) & 7
        ^ (bitwise or, xor, multiply, ...)

This optimization could be for "e & M" where e contains a subexpression of the
form "t & N" which can (sometimes) be simplified to "t".  I suppose that would
require walking the tree.


-- 


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


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