[vector]
Paul Sandoz
paul.sandoz at oracle.com
Thu May 14 22:20:21 UTC 2020
Hi,
Please review this change to clean up the vector load store operations and add tests for out-of-bounds:
http://cr.openjdk.java.net/~psandoz/panama/vector-load-store-cleanup/webrev/ <http://cr.openjdk.java.net/~psandoz/panama/vector-load-store-cleanup/webrev/>
I tried to make the load/store operations more uniform and correct with their bounds checks (some were absent and other exceptions might be caused on the slow path due to the way buffers were wrapped).
Although strictly not not necessary I retained the call to checkMaskFromIndexSize for masked loads and stores. I like the exception message it produces.
For masked stores I was careful to avoid the use of blend (a masked store is not currently optimized if any lanes are masked), thereby ensuring stores do not stomp on something else writing in between the load, blend, and store sequence.
The approach to testing for out-of-bounds is to invoke a non-inlined method with correct bounds multiple times to compile it, then execute with incorrect bounds. I may need to define a method per test to avoid reuse. For now the tests have proved effective at finding issues.
I removed the read only BB load/store tests, as I don’t think they add anything with regards to testing. Separately we do need to test and fix storing into a read only byte buffer (at the moment the stores ignore that).
Paul.
More information about the panama-dev
mailing list