[vectorIntrinsics+mask] RFR: 8269282: Add masking support for vector gather_load/scatter_store
Xiaohong Gong
xgong at openjdk.java.net
Tue Jun 29 00:50:38 UTC 2021
On Fri, 25 Jun 2021 04:11:53 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
> This patch adds the masking support for masked vector gather load and scatter store, including:
> 1) The Vector API java implementation and hotspot intrinsics changes:
> - Add masking information to the `loadWithMap/storeWithMap` intrinsics.
> - Both masked and non-masked gather_load/scatter_store call the same intrinsics. The mask value and class are set to `"null"` for non-masked operations.
> 2) The C2 compiler changes:
> - Add two new IRs for the masked gather_load/scatter_store. The new masked IR will be generated for masked operation if the platform supports the predicate feature and the backend has implemented it. Otherwise, the compiler will go back to the default java implementation.
> Java changes look good, but i cannot verify due to compilation errors (enabled warnings as errors), i think unrelated to this patch, can you fix at the same time?
>
> ```
> /Users/sandoz/Projects/jdk/panama-vector/src/hotspot/share/opto/chaitin.cpp:642:38: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
> } else if (lrg.num_regs() == 1 && !lrg.is_scalable() ||
> ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ ~~
> /Users/sandoz/Projects/jdk/panama-vector/src/hotspot/share/opto/chaitin.cpp:642:38: note: place parentheses around the '&&' expression to silence this warning
> } else if (lrg.num_regs() == 1 && !lrg.is_scalable() ||
> ^
> ( )
> /Users/sandoz/Projects/jdk/panama-vector/src/hotspot/share/opto/chaitin.cpp:643:36: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
> lrg.is_scalable() && lrg.scalable_reg_slots() == 1) {
> ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/sandoz/Projects/jdk/panama-vector/src/hotspot/share/opto/chaitin.cpp:643:36: note: place parentheses around the '&&' expression to silence this warning
> lrg.is_scalable() && lrg.scalable_reg_slots() == 1) {
> ^
> ( )
> 2 errors generated.
> ```
Thanks for your review! Yes, this issue is related to the previous register allocation patch. I will fix it at the same time. Thanks for reminding!
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/95
More information about the panama-dev
mailing list