RFR: 8346664: C2: Optimize mask check with constant offset [v10]
Emanuel Peter
epeter at openjdk.org
Fri Jan 31 06:39:45 UTC 2025
On Thu, 30 Jan 2025 19:33:29 GMT, Matthias Ernst <duke at openjdk.org> wrote:
>> Did you split the method to have an additional `@IR` rule, for the `AlilgnVector` true and false case? If so, you can actually have multiple `@IR` annotations per method. That would be preferrable ;)
>>
>> Also: the exact number of vectors that are generated can vary on platforms, it depends on how much we unroll the vectorized loop for example. So it is best not to have an exact count like `= 10`, but rather just a `> 0`, so that we don't get issues on the various platforms we run these tests on ;)
>>
>> Background to `AlignVector`:
>> It is about strict alignment requirements for vector loads / stores. If we cannot prove that at runtime the vectors are alignable, then we refuse to vectorize under `AlignVector=true`. Having invariants often already gets us to that unfortunate case.
>>
>> Why don't you reorganize the IR rules so that we have one for true/false, and then I can help with additional comment lines that explain why they are correct :)
>
>> Why don't you reorganize the IR rules so that we have one for true/false, and then I can help with additional comment lines that explain why they are correct :)
>
> Done. Probably best for you to add suggestions.
@mernst-github thanks for making the updates!
Let me know when you have worked through my suggestions, and then I can run another round of testing, just to make sure we got the IR rules right on different kinds of hardware ;)
I'll review your VM code again later, once we know we have no crashes / failing tests.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22856#issuecomment-2626413408
More information about the hotspot-compiler-dev
mailing list