[vectorIntrinsics+mask] RFR: 8264563: Add masked vector intrinsics for binary/store operations [v5]
Xiaohong Gong
xgong at openjdk.java.net
Wed Apr 21 10:01:41 UTC 2021
On Wed, 21 Apr 2021 09:22:57 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> I have one request: `m == null` should be part of internal agreement between JVM and JDK and completely hidden from users. It means that all non-masked operations (when/if they are migrated to masked intrinsics) should pass `null` constant as a mask and all masked operations should perform the null check to ensure mask value is always non-null and clearly communicate that to JITs.
Thanks for your comments @iwanowww ! This is a really great question that I also considered it before. Yes, I think it has to guarantee the mask value is non-null for masked operations, so that the JIT can clearly know how to generate right codes. Since the `m == null` check in API implementation could block the vector box elimination, I think we could add a check (e.g. `this.check(m);`) like what have done for two normal vectors for the masked `lanewise` APIs. Although this is mainly used to check the species of two vectors, it can expose the `null` value of mask at the beginning of API. Sounds ok? Thanks!
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/57
More information about the panama-dev
mailing list