RFR: 8336860: x86: Change integer src operand for CMoveL of 0 and 1 to long [v4]

Jasmine Karthikeyan jkarthikeyan at openjdk.org
Fri Aug 30 14:58:01 UTC 2024


> Hi all,
> This patch fixes `cmovL_imm_01*` instructions matching against an integer immediate 1 instead of a long immediate 1. I noticed while looking at the backend implementation of CMove that the rules specify `immI_1` instead of `immL1`, which means that the instructions can't be matched and instead falls through to the base case. I added a small benchmark and got these results:
> 
>                                         Baseline                     Patch           Improvement
> Benchmark                Mode  Cnt    Score   Error  Units      Score   Error  Units
> BasicRules.cmovL_imm_01  avgt   15  259.073 ± 5.806  ns/op    231.108 ± 2.730  ns/op  (+ 11.41%)
> 
> Thoughts and reviews would be appreciated!

Jasmine Karthikeyan has updated the pull request incrementally with one additional commit since the last revision:

  Move architecture checks into IR

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/20275/files
  - new: https://git.openjdk.org/jdk/pull/20275/files/1b926ecf..2d5dc243

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=20275&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20275&range=02-03

  Stats: 4 lines in 1 file changed: 0 ins; 1 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/20275.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20275/head:pull/20275

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


More information about the hotspot-compiler-dev mailing list