public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/85516] [missed-optimization] gcc does not convert multiple compares against constants to a shift+bitmask test
[not found] <bug-85516-4@http.gcc.gnu.org/bugzilla/>
@ 2021-07-24 9:53 ` pinskia at gcc dot gnu.org
2021-11-29 15:28 ` avi at scylladb dot com
2021-11-29 15:29 ` avi at scylladb dot com
2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-24 9:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85516
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |tree-optimization
Severity|normal |enhancement
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note on the trunk we get the full optimized version with the switch now:
check_mask(E):
cmpl $9, %edi
ja .L3
movl $562, %eax
btq %rdi, %rax
setc %al
ret
.L3:
xorl %eax, %eax
ret
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/85516] [missed-optimization] gcc does not convert multiple compares against constants to a shift+bitmask test
[not found] <bug-85516-4@http.gcc.gnu.org/bugzilla/>
2021-07-24 9:53 ` [Bug tree-optimization/85516] [missed-optimization] gcc does not convert multiple compares against constants to a shift+bitmask test pinskia at gcc dot gnu.org
@ 2021-11-29 15:28 ` avi at scylladb dot com
2021-11-29 15:29 ` avi at scylladb dot com
2 siblings, 0 replies; 3+ messages in thread
From: avi at scylladb dot com @ 2021-11-29 15:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85516
--- Comment #6 from Avi Kivity <avi at scylladb dot com> ---
gcc 11.2 produces optimized code with the original example:
check_mask(E):
cmpl $9, %edi
ja .L3
movl %edi, %ecx
movl $562, %eax
shrq %cl, %rax
andl $1, %eax
ret
.L3:
xorl %eax, %eax
ret
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/85516] [missed-optimization] gcc does not convert multiple compares against constants to a shift+bitmask test
[not found] <bug-85516-4@http.gcc.gnu.org/bugzilla/>
2021-07-24 9:53 ` [Bug tree-optimization/85516] [missed-optimization] gcc does not convert multiple compares against constants to a shift+bitmask test pinskia at gcc dot gnu.org
2021-11-29 15:28 ` avi at scylladb dot com
@ 2021-11-29 15:29 ` avi at scylladb dot com
2 siblings, 0 replies; 3+ messages in thread
From: avi at scylladb dot com @ 2021-11-29 15:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85516
Avi Kivity <avi at scylladb dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #7 from Avi Kivity <avi at scylladb dot com> ---
Marking as fixed, since at least 11.2.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-29 15:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-85516-4@http.gcc.gnu.org/bugzilla/>
2021-07-24 9:53 ` [Bug tree-optimization/85516] [missed-optimization] gcc does not convert multiple compares against constants to a shift+bitmask test pinskia at gcc dot gnu.org
2021-11-29 15:28 ` avi at scylladb dot com
2021-11-29 15:29 ` avi at scylladb 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).