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

Marcus G K Williams github.com+168222+mgkwill at openjdk.java.net
Wed Mar 10 00:21:09 UTC 2021


On Mon, 8 Mar 2021 21:59:53 GMT, Marcus G K Williams <github.com+168222+mgkwill at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/codegen/BMI2.java line 29:
>> 
>>> 27:  *
>>> 28:  * @run main/othervm -Xbatch -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+AbortVMOnCompilationFailure
>>> 29:  *      -XX:CompileCommand=compileonly,compiler.codegen.BMI2$BMITests::*
>> 
>> It might be better to use "-XX:CompileCommand=dontinline,compiler.codegen.BMI2$BMITests::*" Then the main methods can still be compiled. As long as BMI2$BMITests method isn't inlining other BMI2$BMITests methods this is will just work just fine.
>
> Sounds reasonable.

I tried to use "-XX:CompileCommand=dontinline,compiler.codegen.BMI2$BMITests::*" however I'm unable to directly verify the C2 compilation of bzhiI2L() method and therefor bzhiq instructions that should be generated. I see the testZeroBzhiI2L() testOneBzhiI2L() methods get compiled and they both make a static call to  bzhiI2L() but it doesn't appear to be C2 compiled.

I'm using the following command: 'make test TEST="jtreg:test/hotspot/jtreg/compiler/codegen/BMI2.java" JTREG="VM_OPTIONS=-XX:+UnlockDiagnosticVMOptions -XX:-TieredCompilation -XX:+PrintAssembly -Xbatch -XX:CompileCommand=print,compiler.codegen.BMI2$BMITests::* -XX:CompileCommand=dontinline,compiler.codegen.BMI2$BMITests::*" CONF=linux-x86_64-server-slowdebug'

But I've tried many variations. If I use "-XX:CompileCommand=compileonly,compiler.codegen.BMI2$BMITests::*" I can manually verify that bzhiq is generated by C2 compiler.

I'd prefer to leave this as is unless I'm missing something.

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

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


More information about the hotspot-compiler-dev mailing list