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

Zhiqiang Zang duke at openjdk.java.net
Sat Dec 18 21:07:53 UTC 2021


> 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:

  slightly update microbenchmark

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/6675/files
  - new: https://git.openjdk.java.net/jdk/pull/6675/files/290e9f20..16580b27

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

  Stats: 15 lines in 1 file changed: 10 ins; 0 del; 5 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