-
Sub-task
-
Resolution: Fixed
-
P4
-
21
-
b03
This is a subtask of JDK-8303113.
In SuperWord::can_create_pairs, we check if memrefs are aligned with all other memrefs if "vectors_should_be_aligned()". This is good and indeed required.
But if we have "vectors_should_be_aligned() == false", we should not have to impose any alignment requirements on the memrefs, this only prevents vectorization.
Thus, we should always take the path that "_do_vector_loop" does: just allow the packing optimistically. And later in SuperWord::combine_packs, perform the independence check on all packs to guarantee the independence on pack level. We could also drop this completely and just detect the cycles during scheduling. But then we may miss partial vectorization opportunities: the independence checks can just filter out those packs that are problematic, and leave those that are safe.
This should strictly allow more vectorization. Some tests may have to be adapted that now check that we have no vectorization. Other tests can now drop the CompileCommand Option Vectorize.
In SuperWord::can_create_pairs, we check if memrefs are aligned with all other memrefs if "vectors_should_be_aligned()". This is good and indeed required.
But if we have "vectors_should_be_aligned() == false", we should not have to impose any alignment requirements on the memrefs, this only prevents vectorization.
Thus, we should always take the path that "_do_vector_loop" does: just allow the packing optimistically. And later in SuperWord::combine_packs, perform the independence check on all packs to guarantee the independence on pack level. We could also drop this completely and just detect the cycles during scheduling. But then we may miss partial vectorization opportunities: the independence checks can just filter out those packs that are problematic, and leave those that are safe.
This should strictly allow more vectorization. Some tests may have to be adapted that now check that we have no vectorization. Other tests can now drop the CompileCommand Option Vectorize.
- relates to
-
JDK-8316594 C2 SuperWord: wrong result with hand unrolled loops
- Resolved
-
JDK-8339349 Crash in the GC running the DaCapo spring benchmark
- Closed