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

trt at acm dot org gcc-bugzilla@gcc.gnu.org
Wed Mar 21 18:28:00 GMT 2007



------- 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



More information about the Gcc-bugs mailing list