Integrated: 8260501: [Vector API] Improve register usage for shift operations on x86
Jie Fu
jiefu at openjdk.java.net
Sun Jan 31 00:31:43 UTC 2021
On Wed, 27 Jan 2021 11:52:54 GMT, Jie Fu <jiefu at openjdk.org> wrote:
> Hi all,
>
> I found the register usage is less optimized for some shift operations.
> For example, vshiftL_imm [1]/vshiftI_imm require dst != src.
> But it's actually fine for the register allocator to assign dst == src.
>
> Also, vshiftL [2]/vshiftI/vshiftS require dst != src.
> But it's actually required for UseAVX==0 only.
> For the most common cases (UseAVX > 0), it's fine to assign dst == src.
>
> The fix splits vshiftS/vshiftI/vshiftL into UseAVX > 0 and UseAVX == 0 cases.
> And just removes the unreasonable requirement for vshiftI_imm and vshiftL_imm.
>
> Testing:
> - jdk/incubator/vector/ on x64 with UseAVX=3/2/1/0, no regression
>
> Thanks.
> Best regards,
> Jie
>
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86.ad#L6058
> [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86.ad#L6037
This pull request has now been integrated.
Changeset: 0da9cad5
Author: Jie Fu <jiefu at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/0da9cad5
Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod
8260501: [Vector API] Improve register usage for shift operations on x86
Reviewed-by: vlivanov, kvn
-------------
PR: https://git.openjdk.java.net/jdk/pull/2257
More information about the hotspot-compiler-dev
mailing list