8257531: Super word not applied to a loop of simple Buffer operations #1618
In Buffer case there is additional (loop invariant) load from java/nio/IntBuffer.offset field.
Invariant reference is used to make sure all memory accesses in vectors use the same one. And only when alignment code is generated in pre-loop it is used for code generatin. But that code did not take into account that invariant have to be scaled if needed as in this example (invariant_LoadI << shift).
I propose to record scaling (left shift) for invariant when it is present and use it to compare invariants and in pre-loop alignment code generation. I also slightly modified tracing output code for invariants.
This allow vectorize Java code which uses Buffer.
I added new test based on @PaulSandoz example. It tests presence of new vectors and correctness of vectorized code.
Testing: tier1-4, precheckin-comp (-Xcomp), renaissance test
@vnkozlov This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been 22 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
@vnkozlov Since your change was applied there have been 22 commits pushed to the
Your commit was automatically rebased without conflicts.
Pushed as commit dd0b945.