Integrated: 8288022: c2: Transform (CastLL (AddL into (AddL (CastLL when possible
    Roland Westrelin 
    roland at openjdk.org
       
    Wed Jul  6 11:39:03 UTC 2022
    
    
  
On Mon, 13 Jun 2022 08:26:47 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> This implements a transformation that already exists for CastII and
> ConvI2L and helps code generation. The tricky part is that:
> 
> (CastII (AddI into (AddI (CastII
> 
> is performed by first computing the bounds of the type of the AddI. To
> protect against overflow, jlong variables are used. With CastLL/AddL
> nodes there's no larger integer type to promote the bounds to. As a
> consequence the logic in the patch explicitly tests for overflow. That
> logic is shared by the int and long cases. The previous logic for the
> int cases that promotes values to long is used as verification.
> 
> This patch also widens the type of CastLL nodes after loop opts the
> way it's done for CastII/ConvI2L to allow commoning of nodes.
> 
> This was observed to help with Memory Segment micro benchmarks.
This pull request has now been integrated.
Changeset: cbaf6e80
Author:    Roland Westrelin <roland at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/cbaf6e807e2b959a0264c87035916850798a2dc6
Stats:     519 lines in 8 files changed: 400 ins; 93 del; 26 mod
8288022: c2: Transform (CastLL (AddL into (AddL (CastLL when possible
Reviewed-by: thartmann, kvn
-------------
PR: https://git.openjdk.org/jdk/pull/9139
    
    
More information about the hotspot-compiler-dev
mailing list