https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40210
Roger Sayle changed:
What|Removed |Added
CC||roger at nextmovesoftware dot
com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40210
--- Comment #12 from CVS Commits ---
The master branch has been updated by Roger Sayle :
https://gcc.gnu.org/g:4c619132b3f14dc5e672a7f2f0e09cb784193559
commit r12-2137-g4c619132b3f14dc5e672a7f2f0e09cb784193559
Author: Roger Sayle
Date: Thu J
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40210
--- Comment #11 from Pawel Sikora 2011-10-07 18:45:57
UTC ---
(In reply to comment #10)
> (In reply to comment #9)
> > Created attachment 25442 [details]
> > testcase
>
> I think those are hard to optimize really since those are inline-asm reall
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40210
--- Comment #10 from Andrew Pinski 2011-10-07
18:29:07 UTC ---
(In reply to comment #9)
> Created attachment 25442 [details]
> testcase
I think those are hard to optimize really since those are inline-asm really.
And the unsigned short one gets
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40210
--- Comment #9 from Pawel Sikora 2011-10-07 18:22:25
UTC ---
Created attachment 25442
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25442
testcase
--- Comment #8 from hp at gcc dot gnu dot org 2009-06-10 17:36 ---
(In reply to comment #7)
> I do think that bit operations in general
> could be handled a lot better, and that would help out a whole lot of code.
If you add (compilable) test-cases with enhancement requests, carefully
--- Comment #7 from eric-bugs at omnifarious dot org 2009-05-20 20:22
---
I've been playing around a bit more, and I've noticed that gcc in general does
not do a spectacular job of optimizing bitwise operations of any kind.
Some kind of general framework for tracking the movements of i
--- Comment #6 from jakub at gcc dot gnu dot org 2009-05-20 20:05 ---
There are plenty other possible builtin bswap optimizations. E.g.
extern void bar (void);
void foo (int x)
{
if (__builtin_bswap32 (x) == __builtin_bswap32 (0x1234567))
bar ();
}
should be optimized into if (x
--- Comment #5 from eric-bugs at omnifarious dot org 2009-05-20 19:39
---
This code:
#include
#include
inline uint64_t byteswap_64(const uint64_t x)
{
return __builtin_bswap64(x);
}
inline uint32_t byteswap_32(const uint32_t x)
{
return __builtin_bswap32(x);
}
extern void ra