public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/90087] Suboptimal codegen for x < 0 ? x - INT_MIN : x
[not found] <bug-90087-4@http.gcc.gnu.org/bugzilla/>
@ 2022-01-01 9:24 ` pinskia at gcc dot gnu.org
2023-05-16 2:55 ` pinskia at gcc dot gnu.org
2023-05-24 7:57 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-01 9:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90087
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/90087] Suboptimal codegen for x < 0 ? x - INT_MIN : x
[not found] <bug-90087-4@http.gcc.gnu.org/bugzilla/>
2022-01-01 9:24 ` [Bug tree-optimization/90087] Suboptimal codegen for x < 0 ? x - INT_MIN : x pinskia at gcc dot gnu.org
@ 2023-05-16 2:55 ` pinskia at gcc dot gnu.org
2023-05-24 7:57 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-16 2:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90087
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
THis way with type_min and type_max filled out correctly.
(simplify
(cond (lt @0 integer_zero_p) (minus @0 INTEGER_CST@1) @0)
(if (TYPE_SIGNED (type) && wi::to_widest(@0) == type_min(@0))
(bit_ior @0 { build_int_cst (type_max(type), type); } )))
Note I think TYPE_PRECISION needs to be a power of 2 but I could be wrong ...
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/90087] Suboptimal codegen for x < 0 ? x - INT_MIN : x
[not found] <bug-90087-4@http.gcc.gnu.org/bugzilla/>
2022-01-01 9:24 ` [Bug tree-optimization/90087] Suboptimal codegen for x < 0 ? x - INT_MIN : x pinskia at gcc dot gnu.org
2023-05-16 2:55 ` pinskia at gcc dot gnu.org
@ 2023-05-24 7:57 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-24 7:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90087
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |78115
Status|ASSIGNED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Basically a dup of bug 78115.
*** This bug has been marked as a duplicate of bug 78115 ***
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78115
[Bug 78115] Missed optimization for "int modulo 2^31"
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-24 7:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-90087-4@http.gcc.gnu.org/bugzilla/>
2022-01-01 9:24 ` [Bug tree-optimization/90087] Suboptimal codegen for x < 0 ? x - INT_MIN : x pinskia at gcc dot gnu.org
2023-05-16 2:55 ` pinskia at gcc dot gnu.org
2023-05-24 7:57 ` 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).