RFR: 8261671: X86 I2L conversion can be skipped for certain masked positive values [v3]

Marcus G K Williams github.com+168222+mgkwill at openjdk.java.net
Wed Feb 17 21:07:39 UTC 2021


On Wed, 17 Feb 2021 20:38:45 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> > > Please, add a test which verifies result of generated code for different ranges of mask (especially corner cases). See `compiler//codegen/BMI1.java`
> > > There are also example of verification of generated assembler in `compiler//intrinsics/bmi/`
> > 
> > 
> > I'm taking a look at a test to verify generated code like the BMI1 test you suggest above.
> > There is a current test that verifies operation indirectly (both long to int and int to long): test/hotspot/jtreg/compiler/c2/TestSkipLongToIntCast.java
> 
> It does not cover your case which have `AND` operation.
> But I am fine if you add your case to it (or to other test, like BMI1.java) instead of creating new test file.
> 
> > Do we need both? A number of similar patches have been merged without, https://hg.openjdk.java.net/jdk/jdk/rev/d0f55423e913 for example.
> 
> Missing tests in previous changes does not mean we should never create one.

Thanks @vnkozlov. 

In the process of testing both a BMI2.java and compiler/intrinsics/bmi/verifycode/BzhiTest.java addition I have written to test this change.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2590


More information about the hotspot-compiler-dev mailing list