public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/32648] missed-optimization: bit-manipulation via bool's
[not found] <bug-32648-4@http.gcc.gnu.org/bugzilla/>
@ 2012-02-27 3:39 ` pinskia at gcc dot gnu.org
2023-06-10 1:56 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-27 3:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32648
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-27 02:50:36 UTC ---
Right now on the trunk we produce:
movl %edi, %edx
movl %edi, %eax
shrl $3, %edx
shrl $5, %eax
xorl %edx, %eax
andl $1, %eax
ret
Which is much better than what we produce before.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/32648] missed-optimization: bit-manipulation via bool's
[not found] <bug-32648-4@http.gcc.gnu.org/bugzilla/>
2012-02-27 3:39 ` [Bug tree-optimization/32648] missed-optimization: bit-manipulation via bool's pinskia at gcc dot gnu.org
@ 2023-06-10 1:56 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-10 1:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32648
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
We even miss f3 into f4:
unsigned f3(unsigned a)
{
long b5 = (a & 0x20)>>5;
long b3 = (a & 0x08)>>3;
return b5 ^ b3;
}
unsigned f4(unsigned a)
{
unsigned b5 = (a ^ (a << 2));
return (b5>>5)&1;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/32648] missed-optimization: bit-manipulation via bool's
2007-07-06 12:25 [Bug c++/32648] New: " wouter dot vermaelen at scarlet dot be
2007-07-06 12:54 ` [Bug tree-optimization/32648] " rguenth at gcc dot gnu dot org
@ 2007-07-07 3:10 ` rob1weld at aol dot com
1 sibling, 0 replies; 4+ messages in thread
From: rob1weld at aol dot com @ 2007-07-07 3:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rob1weld at aol dot com 2007-07-07 03:10 -------
There is a whole list of these optimizations at:
http://graphics.stanford.edu/~seander/bithacks.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32648
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/32648] missed-optimization: bit-manipulation via bool's
2007-07-06 12:25 [Bug c++/32648] New: " wouter dot vermaelen at scarlet dot be
@ 2007-07-06 12:54 ` rguenth at gcc dot gnu dot org
2007-07-07 3:10 ` rob1weld at aol dot com
1 sibling, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-07-06 12:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2007-07-06 12:54 -------
Confirmed. This needs VRP of bits. The IL we generate is currently
bool b3;
bool b5;
int D.2483;
int D.2482;
int D.2481;
<bb 2>:
D.2481_2 = a_1(D) & 32;
b5_3 = D.2481_2 != 0;
D.2482_4 = a_1(D) & 8;
b3_5 = D.2482_4 != 0;
D.2483_6 = b5_3 != b3_5;
return D.2483_6;
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c++ |tree-optimization
Ever Confirmed|0 |1
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2007-07-06 12:54:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32648
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-10 1:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-32648-4@http.gcc.gnu.org/bugzilla/>
2012-02-27 3:39 ` [Bug tree-optimization/32648] missed-optimization: bit-manipulation via bool's pinskia at gcc dot gnu.org
2023-06-10 1:56 ` pinskia at gcc dot gnu.org
2007-07-06 12:25 [Bug c++/32648] New: " wouter dot vermaelen at scarlet dot be
2007-07-06 12:54 ` [Bug tree-optimization/32648] " rguenth at gcc dot gnu dot org
2007-07-07 3:10 ` rob1weld at aol 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).