[Bug middle-end/109986] missing fold (~a | b) ^ a => ~(a & b)

2023-09-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|---

[Bug middle-end/109986] missing fold (~a | b) ^ a => ~(a & b)

2023-08-01 Thread gabravier at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986 Gabriel Ravier changed: What|Removed |Added CC||gabravier at gmail dot com ---

[Bug middle-end/109986] missing fold (~a | b) ^ a => ~(a & b)

2023-07-27 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986 --- Comment #5 from Ivan Sorokin --- (In reply to CVS Commits from comment #4) > commit r14-2751-g2a3556376c69a1fb588dcf25225950575e42784f > Author: Drew Ross > Co-authored-by: Jakub Jelinek Thank you!

[Bug middle-end/109986] missing fold (~a | b) ^ a => ~(a & b)

2023-07-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:2a3556376c69a1fb588dcf25225950575e42784f commit r14-2751-g2a3556376c69a1fb588dcf25225950575e42784f Author: Drew Ross Date: Mon

[Bug middle-end/109986] missing fold (~a | b) ^ a => ~(a & b)

2023-06-24 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986 --- Comment #3 from Ivan Sorokin --- I tried to investigate why GCC is able to simplify `(a | b) ^ a` and `(a | ~b) ^ a` from comment 2, but not similarly looking `(~a | b) ^ a` from comment 0. `(a | b) ^ a` matches the following pattern from

[Bug middle-end/109986] missing fold (~a | b) ^ a => ~(a & b)

2023-05-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization Last

[Bug middle-end/109986] missing fold (~a | b) ^ a => ~(a & b)

2023-05-26 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986 --- Comment #1 from Ivan Sorokin --- (In reply to Ivan Sorokin from comment #0) > int foo(int a, int b) > { > return (~a | b) ^ a; > } > > This can be optimized to `return ~(a | b);`. This transformation is done by > LLVM, but not by GCC.