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

Vladimir Kozlov kvn at openjdk.java.net
Thu Mar 4 19:41:45 UTC 2021


On Thu, 4 Mar 2021 17:54:36 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.
>
> Hi @vnkozlov. I've added a BMI2.java and a compiler/intrinsics/bmi/verifycode/BzhiTestI2L.java test as you suggested. I'd appreciate any further review or comments.

Thank you! I will run our testing and let you know results.

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

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


More information about the hotspot-compiler-dev mailing list