8354242: VectorAPI: combine vector not operation with compare - #725
8354242: VectorAPI: combine vector not operation with compare#725rm-gh-8 wants to merge 1 commit into
Conversation
|
👋 Welcome back rmesde! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
This backport pull request has now been updated with issue from the original commit. |
|
|
|
/approval request for backport of JDK-8354242: VectorAPI: combine vector not operation with compare. This PR implements a C2 JIT optimization that changes a negated Vector API mask compare into a single compare with the opposite predicate. This is a prerequisite for JDK-8370481 and JDK-8370794, which are for parity with Oracle JDK. Low risk — it is a narrow C2 JIT optimization that includes a new test to validate. |
Backporting JDK-8354242: VectorAPI: combine vector not operation with compare.
This PR implements a C2 JIT optimization that changes a negated Vector API mask compare into a single compare with the opposite predicate.
This is a prerequisite for JDK-8370481 (#728) and JDK-8370794, which are for parity with Oracle JDK.
Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:
make test TEST=test/hotspot/jtreg/compiler/vectorapimake test TEST=test/hotspot/jtreg/compiler/c2/irTestsResults:
windows-x64-specific-test.log
windows-x64-specific-2-test.log
macos-aarch64-specific-test.log
macos-aarch64-specific-2-test.log
linux-x64-specific-test.log
linux-x64-specific-2-test.log
linux-aarch64-specific-test.log
linux-aarch64-specific-2-test.log
Ran the following benchmark on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:
./build/*/images/jdk/bin/java -jar build/*/images/test/micro/benchmarks.jar org.openjdk.bench.jdk.incubator.vector.MaskCompareNotBenchmarkwindows-x64-benchmark-test-before-change.log
windows-x64-benchmark-test.log
macos-aarch64-benchmark-test-before-change.log
macos-aarch64-benchmark-test.log
linux-x64-benchmark-test-before-change.log
linux-x64-benchmark-test.log
linux-aarch64-benchmark-test-before-change.log
linux-aarch64-benchmark-test.log
Across all four platforms (linux-aarch64, linux-x64, macos-aarch64, windows-x64), the change did not produce performance regressions.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/725/head:pull/725$ git checkout pull/725Update a local copy of the PR:
$ git checkout pull/725$ git pull https://git.openjdk.org/jdk25u-dev.git pull/725/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 725View PR using the GUI difftool:
$ git pr show -t 725Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/725.diff
Using Webrev
Link to Webrev Comment