Request for review (L): 6797305: Add LoadUB and LoadUI opcode class

Christian Thalinger Christian.Thalinger at Sun.COM
Fri Mar 6 05:06:42 PST 2009


On Fri, 2009-03-06 at 13:28 +0100, Ulf Zibis wrote:
> Hi Christian,
> 
> just to be sure, if following is included in your fix:
> 
> What's about:
>     char c = (char)(b & 0xFF)
>     char c = (char)(i & 0xFF)
> After optimization, it should be fast as or faster as
>     char c = (char)b
> Goal: determination, if b is positive, becomes superfluous, so we could use { char c = (char)(i & 0xFF) } in any case without speed loss.
> 
> Also consider:
>     char c = (char)(i & 0xFFFF)

Good point.  This change only includes optimizations for array load
operations.  I will cover cases like above in a new CR (change request).

>     char c = (char)(intarray[i] & 0xFFFF)

Another good point.  The current load optimizations only cover widening,
but no shortening.  Looks like another CR.

Please feel free to send me some of your common use cases.

-- Christian




More information about the hotspot-compiler-dev mailing list