[vector] Fix variable shift count amount
Lupusoru, Razvan A
razvan.a.lupusoru at intel.com
Tue May 22 22:58:42 UTC 2018
Thanks for looking at this Paul. I will update the patch to use SPECIES instead of calling the species method.
Regarding whether it makes sense to set them like zero - I do not think that will be useful. From an optimized code point of view, we want to initialize them with a broadcast because that way, there is no global object that needs unboxed. Even now, ZERO is not actually used in any intrinsic implementation other than the default implementation.
Thanks,
Razvan
-----Original Message-----
From: Paul Sandoz [mailto:paul.sandoz at oracle.com]
Sent: Monday, May 21, 2018 4:24 PM
To: Lupusoru, Razvan A <razvan.a.lupusoru at intel.com>
Cc: panama-dev at openjdk.java.net
Subject: Re: [vector] Fix variable shift count amount
> On May 21, 2018, at 3:50 PM, Lupusoru, Razvan A <razvan.a.lupusoru at intel.com> wrote:
>
> Hi everyone,
>
> This is a fix to follow up on an issue that Paul’s comments led to its discovery. Namely that scalar implementation of shift implicitly truncates the shift count while the vector instructions actually saturate on the shift count. This patch fixes this issue. We will be working on adding a few tests soon so stay posted - they will be done as a follow up change.
> http://cr.openjdk.java.net/~rlupusoru/panama/webrev_varshiftcountfix_00/index.html
>
Thanks for doing this, and for thinking about the tests.
You can use the SPECIES constant rather than the method call, as is used in other places.
It makes me wonder whether we should declare these 0x1f/0x3f vectors in the same manner as ZERO. WDYT?
Paul.
> Thanks,
> Razvan
More information about the panama-dev
mailing list