RFR: 8292289: [vectorapi] Improve the implementation of VectorTestNode [v2]

Quan Anh Mai duke at openjdk.org
Thu Aug 18 02:54:18 UTC 2022


On Thu, 18 Aug 2022 02:28:41 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 17 commits:
>> 
>>  - redo aarch
>>  - Merge branch 'master' into improveVTest
>>  - delete aarch64 vector files
>>  - copyright
>>  - fix condition
>>  - fix alltrue
>>  - change VectorTest to subclass Cmp
>>  - add test
>>  - fix aarch build
>>  - remove dst in x86.ad
>>  - ... and 7 more: https://git.openjdk.org/jdk/compare/0d96546a...cac9948e
>
> test/hotspot/jtreg/compiler/vectorapi/TestVectorTest.java line 53:
> 
>> 51:     public int branch(long maskLong) {
>> 52:         var mask = VectorMask.fromLong(ByteVector.SPECIES_PREFERRED, maskLong);
>> 53:         return mask.allTrue() ? call() : 0;
> 
> Why not use `return mask.allTrue() ? 1 : 0` like the following `cmove`?

An non-inline call is to assure that this results in a control flow instead of just a `CMove` node as in the case of the other method.

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

PR: https://git.openjdk.org/jdk/pull/9855


More information about the hotspot-dev mailing list