RFR: 8260501: [Vector API] Improve register usage for shift operations on x86 [v2]

Jie Fu jiefu at openjdk.java.net
Thu Jan 28 02:09:58 UTC 2021


> 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

Jie Fu has updated the pull request incrementally with two additional commits since the last revision:

 - Recuce the binary size
 - Revert changes

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2257/files
  - new: https://git.openjdk.java.net/jdk/pull/2257/files/b528758e..fb207730

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2257&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2257&range=00-01

  Stats: 84 lines in 1 file changed: 20 ins; 46 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2257.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2257/head:pull/2257

PR: https://git.openjdk.java.net/jdk/pull/2257


More information about the hotspot-compiler-dev mailing list