public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/108133] New: Failure to merge conditional bit clears
@ 2022-12-15 18:26 rguenth at gcc dot gnu.org
2022-12-15 18:35 ` [Bug tree-optimization/108133] " pinskia at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-12-15 18:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108133
Bug ID: 108133
Summary: Failure to merge conditional bit clears
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
void foo (int *p)
{
if (*p & (1<<3))
*p &= ~(1<<3);
if (*p & (1<<5))
*p &= ~(1<<5);
if (*p & (1<<6))
*p &= ~(1<<6);
}
could be optimized to
if (*p & ((1<<3)|(1<<5)|(1<<6)))
*p &= ~((1<<3)|(1<<5)|(1<<6));
We have such code in tree-inline.cc:
/* Clear flags that need revisiting. */
if (gcall *call_stmt = dyn_cast <gcall *> (copy))
{
if (gimple_call_tail_p (call_stmt))
gimple_call_set_tail (call_stmt, false);
if (gimple_call_from_thunk_p (call_stmt))
gimple_call_set_from_thunk (call_stmt, false);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/108133] Failure to merge conditional bit clears
2022-12-15 18:26 [Bug tree-optimization/108133] New: Failure to merge conditional bit clears rguenth at gcc dot gnu.org
@ 2022-12-15 18:35 ` pinskia at gcc dot gnu.org
2022-12-15 18:37 ` pinskia at gcc dot gnu.org
2022-12-15 18:42 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-15 18:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108133
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think there is a dup of this bug already ...
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/108133] Failure to merge conditional bit clears
2022-12-15 18:26 [Bug tree-optimization/108133] New: Failure to merge conditional bit clears rguenth at gcc dot gnu.org
2022-12-15 18:35 ` [Bug tree-optimization/108133] " pinskia at gcc dot gnu.org
@ 2022-12-15 18:37 ` pinskia at gcc dot gnu.org
2022-12-15 18:42 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-15 18:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108133
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/108133] Failure to merge conditional bit clears
2022-12-15 18:26 [Bug tree-optimization/108133] New: Failure to merge conditional bit clears rguenth at gcc dot gnu.org
2022-12-15 18:35 ` [Bug tree-optimization/108133] " pinskia at gcc dot gnu.org
2022-12-15 18:37 ` pinskia at gcc dot gnu.org
@ 2022-12-15 18:42 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-15 18:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108133
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-12-15
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-15 18:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-15 18:26 [Bug tree-optimization/108133] New: Failure to merge conditional bit clears rguenth at gcc dot gnu.org
2022-12-15 18:35 ` [Bug tree-optimization/108133] " pinskia at gcc dot gnu.org
2022-12-15 18:37 ` pinskia at gcc dot gnu.org
2022-12-15 18:42 ` pinskia at gcc dot gnu.org
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).