[Bug tree-optimization/19055] Minor bit optimization with or and xor

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Feb 22 19:02:00 GMT 2005

------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-22 14:44 -------
If we changed the function in comment #0 like so:
int f(int a)
  return a;

Fold should do this simplification.

And likewise for comment #1 (which is just general case):
int f(int a,int b)
  a=(a|b) ^ b;
  return a;

           What    |Removed                     |Added
OtherBugsDependingO|                            |19987
              nThis|                            |
          Component|rtl-optimization            |tree-optimization


More information about the Gcc-bugs mailing list