RFR: 8278114: New addnode ideal optimization: converting "x + x" into "x << 1" [v11]

Zhiqiang Zang duke at openjdk.java.net
Tue Jan 4 21:05:53 UTC 2022


> A new ideal optimization can be introduced for addnode: converting "x + x" into "x << 1".
> 
> 
> // Convert "x + x" into "x << 1"
> if (in1 == in2) {
>   return new LShiftINode(in1, phase->intcon(1));
> }

Zhiqiang Zang has updated the pull request incrementally with one additional commit since the last revision:

  update copyright year to 2022 in changed files as well.

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/6675/files
  - new: https://git.openjdk.java.net/jdk/pull/6675/files/941ced77..49f95721

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6675&range=10
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6675&range=09-10

  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6675.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6675/head:pull/6675

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


More information about the hotspot-compiler-dev mailing list