[vectorIntrinsics+mask] RFR: 8269343: Masked vector arithmetic intrinsics failed to be inlined randomly
Xiaohong Gong
xgong at openjdk.java.net
Tue Jun 29 02:27:53 UTC 2021
On Mon, 28 Jun 2021 18:54:56 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
> Looks good.
>
Thanks for your review @PaulSandoz !
> I am wondering why its not needed on the vector arguments, is that because there is a cast to `{T}Vector` for vector arguments in templates is sufficient in those cases? Or does the `that.check(this);` help as well?
>
I think one reason is the vector class is transfered by calling `this.getClass()` when calling the intrinsic method. And `that.check(this);` also helps since there is the vector class equalling check inside this method.
I also tried to get the mask class by calling `m.getClass()` like the vector class, but the compiler cannot guarantee the class is a constant which could also make the intrinsic fail to inline. As a reference to the existing `blend` API, it also explicitly set the mask class to the instance of the subclass which is sure to be a constant.
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/96
More information about the panama-dev
mailing list