public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/94882] New: Failure to optimize and+or+sub into xor+not
@ 2020-04-30 12:35 gabravier at gmail dot com
2020-04-30 12:52 ` [Bug tree-optimization/94882] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: gabravier at gmail dot com @ 2020-04-30 12:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94882
Bug ID: 94882
Summary: Failure to optimize and+or+sub into xor+not
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: gabravier at gmail dot com
Target Milestone: ---
int f(int x, int y)
{
return (x & y) - (x | y) - 1;
}
This can be optimized to `~(x ^ y)`. LLVM does this transformation, but GCC
does not.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/94882] Failure to optimize and+or+sub into xor+not
2020-04-30 12:35 [Bug tree-optimization/94882] New: Failure to optimize and+or+sub into xor+not gabravier at gmail dot com
@ 2020-04-30 12:52 ` rguenth at gcc dot gnu.org
2020-07-01 20:49 ` cvs-commit at gcc dot gnu.org
2020-07-01 21:01 ` law at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-30 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94882
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-04-30
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/94882] Failure to optimize and+or+sub into xor+not
2020-04-30 12:35 [Bug tree-optimization/94882] New: Failure to optimize and+or+sub into xor+not gabravier at gmail dot com
2020-04-30 12:52 ` [Bug tree-optimization/94882] " rguenth at gcc dot gnu.org
@ 2020-07-01 20:49 ` cvs-commit at gcc dot gnu.org
2020-07-01 21:01 ` law at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-01 20:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94882
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:
https://gcc.gnu.org/g:553c6572061f6f9ef92514e8f13de95d509ad614
commit r11-1771-g553c6572061f6f9ef92514e8f13de95d509ad614
Author: Jeff Law <law@redhat.com>
Date: Wed Jul 1 14:44:07 2020 -0600
match.pd: (x & y) - (x | y) - 1 -> ~(x ^ y) simplification [PR94882]
gcc/
PR tree-optimization/94882
* match.pd (x & y) - (x | y) - 1 -> ~(x ^ y): New simplification.
gcc/testsuite/
PR tree-optimization/94882
* gcc.dg/tree-ssa/pr94882.c: New test.
* gcc.dg/tree-ssa/pr94882-1.c: New test.
* gcc.dg/tree-ssa/pr94882-2.c: New test.
* gcc.dg/tree-ssa/pr94882-3.c: New test.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/94882] Failure to optimize and+or+sub into xor+not
2020-04-30 12:35 [Bug tree-optimization/94882] New: Failure to optimize and+or+sub into xor+not gabravier at gmail dot com
2020-04-30 12:52 ` [Bug tree-optimization/94882] " rguenth at gcc dot gnu.org
2020-07-01 20:49 ` cvs-commit at gcc dot gnu.org
@ 2020-07-01 21:01 ` law at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: law at redhat dot com @ 2020-07-01 21:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94882
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #3 from Jeffrey A. Law <law at redhat dot com> ---
This should be fixed on the trunk now.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-01 21:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 12:35 [Bug tree-optimization/94882] New: Failure to optimize and+or+sub into xor+not gabravier at gmail dot com
2020-04-30 12:52 ` [Bug tree-optimization/94882] " rguenth at gcc dot gnu.org
2020-07-01 20:49 ` cvs-commit at gcc dot gnu.org
2020-07-01 21:01 ` law at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).