RFR: 8299847: RISC-V: Improve PrintOptoAssembly output of CMoveI/L nodes [v4]

Fei Yang fyang at openjdk.org
Mon Jan 16 13:02:28 UTC 2023


> Witnessed some incorrect/strange branch condition code in PrintOptoAssembly output on RISC-V which is quite misleading. While this won't affect release build, we should fix this for debug build. This also fixes the pipeline for those nodes and bumps the BRANCH_COST a little bit as I think control transfer instructions should have higher cost than regular integer computational instructions.
> 
> With this fix, we have some new PrintOptoAssembly output like following snippet:
> 
>    460 202     B41: #  out( B42 ) <- in( B40 )  Freq: 55.6844
>    461 202 +   li R7, #0       # int, #@loadConI
>    462 204 +   addiw  R28, R9, #1      #@addI_reg_imm
>    463 208 +   li R29, #0      # int, #@loadConI
>    464 20a +   CMove R28, (R28 lt R29), R28, R7        #@cmovI_cmpI      <=============
> 
> 
> Testing: Tier1 tested on HiFive Unmatched board.

Fei Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:

 - Comment
 - Merge branch 'master' into JDK-8299847
 - Fix
 - Fix
 - 8299847: RISC-V: Incorrect branch condition code in PrintOptoAssembly output

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/11919/files
  - new: https://git.openjdk.org/jdk/pull/11919/files/8e4b4c59..08318af8

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

  Stats: 5491 lines in 200 files changed: 3358 ins; 1044 del; 1089 mod
  Patch: https://git.openjdk.org/jdk/pull/11919.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11919/head:pull/11919

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


More information about the hotspot-compiler-dev mailing list