This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/10945] Trivial Bit Twiddling Optimizations Not Performed


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]