public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/51428] New: Some code after SSA expand does nothing
@ 2011-12-05 23:53 pinskia at gcc dot gnu.org
2021-08-08 22:44 ` [Bug tree-optimization/51428] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-05 23:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51428
Bug #: 51428
Summary: Some code after SSA expand does nothing
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pinskia@gcc.gnu.org
While looking into PR 45416, I came across:
/* Check for |= or &= of a bitfield of size one into another bitfield
of size 1. In this case, (unless we need the result of the
assignment) we can do this more efficiently with a
test followed by an assignment, if necessary.
>From what I am reading, this code does nothing any more as TREE_CODE (rhs) will
never be BIT_IOR_EXPR or BIT_AND_EXPR.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug tree-optimization/51428] Some code after SSA expand does nothing
2011-12-05 23:53 [Bug middle-end/51428] New: Some code after SSA expand does nothing pinskia at gcc dot gnu.org
@ 2021-08-08 22:44 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-08 22:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51428
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org
Component|middle-end |tree-optimization
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine for GCC 13 for bitfield lowering.
With the current code I have (which is applied to GCC 10 base compiler), we
get:
_7 = MEM <unsigned char> [(struct f *)a_5(D)];
_8 = _7 & 3;
_3 = _8 != 0;
_10 = BIT_INSERT_EXPR <_7, _3, 0 (1 bits)>;
MEM <unsigned char> [(struct f *)a_5(D)] = _10;
And:
_8 = _7 & 3;
_6 = _8 == 3;
_10 = BIT_INSERT_EXPR <_7, _6, 0 (1 bits)>;
both are not good really as we don't need to extract bit 0 really.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-08 22:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-05 23:53 [Bug middle-end/51428] New: Some code after SSA expand does nothing pinskia at gcc dot gnu.org
2021-08-08 22:44 ` [Bug tree-optimization/51428] " 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).