http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37516
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2012-02-23 AssignedTo|unassigned at gcc dot |pinskia at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-23 08:42:01 UTC --- I have an idea on how to fix this. basically: ~(C - X) is the same as: ~ - (X - C) which then can be simplified to X - (C+1) This should be done on both the tree level (on the pinskia/treecombine branch in tree-ssa-fold.c) and the rtl level in simplify-rtx.c.