RFR: 8300258: C2: vectorization fails on simple ByteBuffer loop

Roland Westrelin roland at openjdk.org
Thu Feb 9 16:07:43 UTC 2023


On Wed, 8 Feb 2023 11:49:41 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> @rwestrel is there a reason why you only replaced these two instances of `same_velt_type`? The logic of "same type" is also used later on in the code of `SuperWord::find_adjacent_refs()`. For example when we have `create_pack == false`, we remove all memops and packs of the "same type". Do you not want to change that too?

They don't have the same purpose AFAIU. The remaining uses in `SuperWord::find_adjacent_refs()` are related to the heuristic to find the best alignment. There it makes sense that the actual size of the operation is what matters, I think. While the one I change deal with correctness in the face of possibly overlapping arrays. So, yes, It's on purpose.

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

PR: https://git.openjdk.org/jdk/pull/12440


More information about the hotspot-compiler-dev mailing list