RFR: 8280511: AArch64: Combine shift and negate to a single instruction [v2]

Fei Gao fgao at openjdk.java.net
Fri Mar 11 06:13:33 UTC 2022


> Hi,
> 
> In AArch64,
> 
> asr     x10, x1, #31
> neg     x0, x10
> 
> can be optimized to:
> `neg    x0, x1, asr #31`
> 
> To implement the instruction combining, we add matching rules in the backend.
> 
> Thanks.

Fei Gao has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - Merge branch 'master' into fg8280511
   
   Change-Id: I80c9540ef3191d1d828b1d123ee346050152ac5b
 - 8280511: AArch64: Combine shift and negate to a single instruction
   
   In AArch64,
   
   asr     x10, x1, #31
   neg     x0, x10
   
   can be optimized to:
   
   neg    x0, x1, asr #31
   
   To implement the instruction combining, we add matching rules in
   the backend.
   
   Change-Id: Iaee06f7a03e97a7e092e13da75812f3722549c3b

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7471/files
  - new: https://git.openjdk.java.net/jdk/pull/7471/files/e8479747..64cbed6f

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

  Stats: 39053 lines in 1020 files changed: 27283 ins; 6072 del; 5698 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7471.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7471/head:pull/7471

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


More information about the hotspot-compiler-dev mailing list