RFR: 8335006: C2 SuperWord: add JMH benchmark VectorLoadToStoreForwarding.java

Emanuel Peter epeter at openjdk.org
Tue Jun 25 13:05:23 UTC 2024


I'm committing the benchmark mentioned in my blog article:
https://eme64.github.io/blog/2024/06/24/Auto-Vectorization-and-Store-to-Load-Forwarding.html

These are the numbers I got on my machine. Read the blog for a full analysis.
![image](https://github.com/openjdk/jdk/assets/32593061/28ba310d-1f7e-4c5c-ae0e-1f38e6214603)

**Quick summary:**
We see that vectorization is only beneficial for `OFFSET = 0, 1, 2, 4, 8, 16`, at least with the current SuperWord implementation. The regression for `OFFSET = 3 `is especially stark.

The effect that explains the slowdown of vectorization for the other cases is failed store-to-load-forwarding.

I ran it like this on my machine:
`make test TEST="micro:vm.compiler.VectorLoadToStoreForwarding" CONF=linux-x64`

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

Commit messages:
 - fix whitespaces
 - JDK-8335006

Changes: https://git.openjdk.org/jdk/pull/19880/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19880&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8335006
  Stats: 212 lines in 1 file changed: 212 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/19880.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19880/head:pull/19880

PR: https://git.openjdk.org/jdk/pull/19880


More information about the hotspot-compiler-dev mailing list