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

Vladimir Kozlov kvn at openjdk.java.net
Wed Feb 17 20:41:39 UTC 2021


On Wed, 17 Feb 2021 18:54:27 GMT, Marcus G K Williams <github.com+168222+mgkwill 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.

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

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


More information about the hotspot-compiler-dev mailing list