8315554: C1: Replace "cmp reg, 0" with "test reg, reg" on x86#15543
8315554: C1: Replace "cmp reg, 0" with "test reg, reg" on x86#15543shipilev wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
|
@shipilev This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 38 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
Our tests here look fine. Mind if I ask @TobiHartmann, @chhagedorn or @veresov to give this one a spin in Oracle test CIs? |
|
Already done - results look good on Windows and Linux! We currently have quite a load for MacOS testing, so it will probably not finish in a timely manner. But I guess it's fine to not wait for that and move forward. |
|
All right then! /integrate |
|
Going to push as commit bd47781.
Your commit was automatically rebased without conflicts. |
Noticed this when looking at C1 profiling code. There are plenty of usages for
cmp reg, 0in C1 x86 code, both in genericLIR_Assembler::comp_op, and in some profiling paths.test reg, regis a denser idiom for this comparison. The difference betweencmpandteston x86 seems to be only with AF (aux carry flag). For ubiquitous int/pointer comparisons, this distinction is irrelevant.C2 already does this transformation in .ad match rules.
Code size improvements with
-Xcomp -XX:+CITime -XX:TieredStopAtLevel=... Hello:Additional testing:
tier1 tier2 tier3x (C1 level 1, 2, 3) x (Parallel, G1, Shenandoah)Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15543/head:pull/15543$ git checkout pull/15543Update a local copy of the PR:
$ git checkout pull/15543$ git pull https://git.openjdk.org/jdk.git pull/15543/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15543View PR using the GUI difftool:
$ git pr show -t 15543Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15543.diff
Webrev
Link to Webrev Comment