RFR: 8333248: VectorGatherMaskFoldingTest.java failed when maximum vector bits is 64

Gui Cao gcao at openjdk.org
Wed Jun 5 08:35:58 UTC 2024


On Tue, 4 Jun 2024 17:51:27 GMT, Damon Fenacci <dfenacci at openjdk.org> wrote:

> > @dafedafe Hi Damon, Maybe you can take a look at this small change? Thanks.
> 
> @zifeihan you're right that the case with a vector length of 64 bits is not covered correctly.
> 
> I wouldn't fix it using different species depending on the length though. The Java Vector API explicitly says that not all shapes are supported by all platforms, and one should choose shape-agnostic code. Also, the IR framework uses the maximum vector size possible (if not explicitly set in the rules). I'd rather make sure that masks are not the same for lengths of 1 (for long and double vectors): something like this `longMask[i] = L_SPECIES.length() > 1 && i % 2 == 0;` would probably do. For long and double indices this cannot be done with length 1. So an option would be to change the asserts to add a check for the length, e.g. `Asserts.assertFalse(L_SPECIES.length() != 1 && res.equals(res2));`. There is always the alternative of not running long and double vector tests with max vector lengths of 64.
> 

Hi Damon, I have done the fix. Can you talk a look again? Thanks

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

PR Comment: https://git.openjdk.org/jdk/pull/19473#issuecomment-2149208164


More information about the hotspot-compiler-dev mailing list