https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986
Andrew Pinski changed:
What|Removed |Added
Status|NEW |RESOLVED
Target Milestone|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986
Gabriel Ravier changed:
What|Removed |Added
CC||gabravier at gmail dot com
---
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!
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986
Andrew Pinski changed:
What|Removed |Added
Keywords||missed-optimization
Last
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.