RFR: 8352248: Check if CMoveX is supported

Christian Hagedorn chagedorn at openjdk.org
Wed Mar 19 07:37:07 UTC 2025


On Tue, 18 Mar 2025 10:02:27 GMT, Hamlin Li <mli at openjdk.org> wrote:

> Hi,
> Can you help to review this patch?
> 
> Currenlty, seems CMoveX are fully supported on most platforms, except of riscv64.
> On riscv64, there is no efficient way to implement CMoveF/D as other CMoveX (e.g. CMoveI), but it will still bring benefit by just supporting CMoveX without CMoveF/D. This patch is to supply such option.
> 
> As other platforms already supported CMoveX, this patch should not impact them, as `!CMoveNode::supported(_igvn.type(phi))` should always be false.
> 
> BTW, in a subsequent pr for riscv, I'll implement CMoveX except of CMoveF/D, and also return false for CMoveF/D in Matcher::match_rule_supported.
> 
> Thanks!

Looks reasonable.

src/hotspot/share/opto/movenode.cpp line 204:

> 202: 
> 203: bool CMoveNode::supported(const Type* t) {
> 204:   switch( t->basic_type() ) {

Suggestion:

  switch (t->basic_type()) {

src/hotspot/share/opto/movenode.cpp line 214:

> 212:     default:
> 213:     ShouldNotReachHere();
> 214:     return false;

Indentation:
Suggestion:

      ShouldNotReachHere();
      return false;

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

Marked as reviewed by chagedorn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24095#pullrequestreview-2697245751
PR Review Comment: https://git.openjdk.org/jdk/pull/24095#discussion_r2002629715
PR Review Comment: https://git.openjdk.org/jdk/pull/24095#discussion_r2002630356


More information about the hotspot-compiler-dev mailing list