RFR: 8298935: fix independence bug in create_pack logic in SuperWord::find_adjacent_refs [v26]
Vladimir Kozlov
kvn at openjdk.org
Wed Mar 15 13:35:46 UTC 2023
On Wed, 15 Mar 2023 08:11:56 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> I call this "happy accident" before my fix, which should not be allowed. It can indeed lead to bugs on very similar examples. I now disallow these "happy accidents", I forbid the re-introduction of memops during extend_packlist.
The test was added by [8290910](https://bugs.openjdk.org/browse/JDK-8290910) fix in JDK 20. Before that superword produces wrong results in these tests. The issue was found with fuzzer testing. I don't know where the test in [8293216](https://bugs.openjdk.org/browse/JDK-8293216) comes from. So you are right about this be corner case.
Based on this I agree with not allowing vectorization in such cases for now.
But file RFE to look on these cases much **later**. If vectorization produces valid result we should allow it. I understand that we are missing more precise checks which separate valid from invalid misaligned operations. I am not suggesting adding back code which extend memory ops without any checks but may be improve find_adjacent_refs when we can accept such cases. It is very complex case and fix could be also complex.
-------------
PR: https://git.openjdk.org/jdk/pull/12350
More information about the hotspot-compiler-dev
mailing list