RFR: 8373026: C2 SuperWord and Vector API: vector algorithms test and benchmark [v15]
Xiaohong Gong
xgong at openjdk.org
Wed Jan 28 08:01:34 UTC 2026
On Wed, 28 Jan 2026 07:20:39 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/vectorization/TestVectorAlgorithms.java line 252:
>>
>>> 250: public Object fillI_VectorAPI(int[] r) {
>>> 251: return VectorAlgorithmsImpl.fillI_VectorAPI(r);
>>> 252: }
>>
>> So the IR check only passes because we rely on `fillI_VectorAPI` being inlined, correct? I'm wondering whether it's possible that the method is not inlined as expected and could the IR check fail if so? Does it deserve a `ForceInline` annotation on methods in the `Impl` file?
>
> That's why both the test and the benchmark have the flag `-XX:CompileCommand=inline,*VectorAlgorithmsImpl*::*` so we can avoid the annotations ;)
>
> If I had to do annotation, then it would be `@ForceInline` for the test, and `@CompilerControl(CompilerControl.Mode.INLINE)` for the benchmark. So that would mean the `Impl` files would not be identical.
Got it. I didn't notice the vm options inside the test. Thanks so much for your explanation!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28639#discussion_r2735323357
More information about the hotspot-compiler-dev
mailing list