This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/10945] Trivial Bit Twiddling Optimizations Not Performed
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2003 02:39:58 -0000
- Subject: [Bug optimization/10945] Trivial Bit Twiddling Optimizations Not Performed
- References: <20030523015537.10945.stl@caltech.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From kazu at cs dot umass dot edu 2003-11-26 02:39 -------
> looks like this is really x86 specific because on PPC, in the
> simple2 vs. revised2 case, the simple2 case is faster than the
> revised2.
I like revised2 in that the expression tree is skewed, resulting in
lower register pressure. If this kind of expression appear in a
larger function, scheduling would probably solve the stall problem by
interleaving other instructions around this sequence. I would guess
that not many people write a non-inline function that only contains
these short expression because the call/return overhead would be very
high.
By the away, I wrote a patch to do this in fold-const.c.
Will post it soon after testing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10945