public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/101339] New: (bit_and (negate (convert thurth_value@1)) integer_onep) is not optimized to just @1
@ 2021-07-06 8:43 pinskia at gcc dot gnu.org
2021-07-06 8:43 ` [Bug tree-optimization/101339] " pinskia at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-06 8:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101339
Bug ID: 101339
Summary: (bit_and (negate (convert thurth_value@1))
integer_onep) is not optimized to just @1
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Take:
int f(int a, int b)
{
_Bool c = a == b;
int t = c;
int t1 = -t;
return t1 & 1;
}
---- CUT ---
This is not optimized to just "return (int)(a == b)" at the gimple level
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/101339] (bit_and (negate (convert thurth_value@1)) integer_onep) is not optimized to just @1
2021-07-06 8:43 [Bug tree-optimization/101339] New: (bit_and (negate (convert thurth_value@1)) integer_onep) is not optimized to just @1 pinskia at gcc dot gnu.org
@ 2021-07-06 8:43 ` pinskia at gcc dot gnu.org
2021-07-06 9:27 ` rguenth at gcc dot gnu.org
2023-05-01 20:34 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-06 8:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101339
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-07-06
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/101339] (bit_and (negate (convert thurth_value@1)) integer_onep) is not optimized to just @1
2021-07-06 8:43 [Bug tree-optimization/101339] New: (bit_and (negate (convert thurth_value@1)) integer_onep) is not optimized to just @1 pinskia at gcc dot gnu.org
2021-07-06 8:43 ` [Bug tree-optimization/101339] " pinskia at gcc dot gnu.org
@ 2021-07-06 9:27 ` rguenth at gcc dot gnu.org
2023-05-01 20:34 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-06 9:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101339
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
And
int f(int a, int b)
{
_Bool c = a == b;
int t = c;
int t1 = t + 1;
return t1 & 1;
}
is not optimized to return (int)a != b either (for any odd add). Addition
of even adds is handled though.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/101339] (bit_and (negate (convert thurth_value@1)) integer_onep) is not optimized to just @1
2021-07-06 8:43 [Bug tree-optimization/101339] New: (bit_and (negate (convert thurth_value@1)) integer_onep) is not optimized to just @1 pinskia at gcc dot gnu.org
2021-07-06 8:43 ` [Bug tree-optimization/101339] " pinskia at gcc dot gnu.org
2021-07-06 9:27 ` rguenth at gcc dot gnu.org
@ 2023-05-01 20:34 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-01 20:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101339
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|pinskia at gcc dot gnu.org |unassigned at gcc dot gnu.org
Status|ASSIGNED |NEW
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
comment #0 was fixed with r13-793-g8fb94fc6097c .
comment #1 is still not fixed and I am not going to work on that one.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-01 20:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 8:43 [Bug tree-optimization/101339] New: (bit_and (negate (convert thurth_value@1)) integer_onep) is not optimized to just @1 pinskia at gcc dot gnu.org
2021-07-06 8:43 ` [Bug tree-optimization/101339] " pinskia at gcc dot gnu.org
2021-07-06 9:27 ` rguenth at gcc dot gnu.org
2023-05-01 20:34 ` 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).