RFR: 8263058: Optimize vector shift with zero shift count [v2]
Eric Liu
github.com+10482586+therealeliu at openjdk.java.net
Thu Mar 11 02:07:18 UTC 2021
> Like scalar shift, vector shift could do nothing when shift count is
> zero.
>
> This patch implements the 'Identity' method for all kinds of vector
> shift nodes to optimize out 'ShiftVCntNode 0', which is typically a
> redundant 'mov' in final generated code like below:
>
> add x17, x12, x14
> ldr q16, [x17, #16]
> mov v16.16b, v16.16b
> add x14, x13, x14
> str q16, [x14, #16]
>
> With this patch, the code above could be optimized as below:
>
> add x17, x12, x14
> ldr q16, [x17, #16]
> add x14, x13, x14
> str q16, [x14, #16]
>
> [TESTS]
> compiler/vectorapi/TestVectorShiftImm.java, jdk/incubator/vector,
> hotspot::tier1 passed without new failure.
Eric Liu has updated the pull request incrementally with one additional commit since the last revision:
fix build failure
Change-Id: Id7d6f4bbb5d8dde8d1a6c5c9cd5052d64fd978a9
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/2911/files
- new: https://git.openjdk.java.net/jdk/pull/2911/files/2a978dac..2bb8a513
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2911&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2911&range=00-01
Stats: 11 lines in 1 file changed: 6 ins; 5 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/2911.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2911/head:pull/2911
PR: https://git.openjdk.java.net/jdk/pull/2911
More information about the hotspot-compiler-dev
mailing list