public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/103614] New: Modulo equality optimization
@ 2021-12-08 4:58 getchar_gnu at hotmail dot com
2021-12-11 2:38 ` [Bug middle-end/103614] " getchar_gnu at hotmail dot com
0 siblings, 1 reply; 2+ messages in thread
From: getchar_gnu at hotmail dot com @ 2021-12-08 4:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103614
Bug ID: 103614
Summary: Modulo equality optimization
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: getchar_gnu at hotmail dot com
Target Milestone: ---
Code: https://gcc.godbolt.org/z/99s5fc695
Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82853
(signed)x%145==0, (unsigned)x%145==0, (unsigned)x%145==1 are all optimized into
form x*c1+c2<c3, but (signed)x%145==1 isn't. (Intended to compile as
(unsigned)(x-1)*266584177<14810233 )
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug middle-end/103614] Modulo equality optimization
2021-12-08 4:58 [Bug c/103614] New: Modulo equality optimization getchar_gnu at hotmail dot com
@ 2021-12-11 2:38 ` getchar_gnu at hotmail dot com
0 siblings, 0 replies; 2+ messages in thread
From: getchar_gnu at hotmail dot com @ 2021-12-11 2:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103614
--- Comment #1 from getchar_gnu at hotmail dot com ---
Not sure if related, but something like x%13==8 && x>17 && x<146 can also
reduce some code
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-11 2:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 4:58 [Bug c/103614] New: Modulo equality optimization getchar_gnu at hotmail dot com
2021-12-11 2:38 ` [Bug middle-end/103614] " getchar_gnu at hotmail 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).