JDK-8371642 : TestNumberOfContinuousZeros.java fails on PPC64
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 26
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: ppc
  • Submitted: 2025-11-11
  • Updated: 2025-11-24
  • Resolved: 2025-11-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26 b25Fixed
Related Reports
Causes :  
Relates :  
Description
The test fails with the following output:

Failed IR Rules (1) of Methods (1)
----------------------------------
1) Method "public java.lang.Object[] compiler.vectorization.TestNumberOfContinuousZeros.testSpecialLongLeadingZeros(long[])" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#V#COUNT_LEADING_ZEROS_VL#_", "> 0"}, applyIfPlatformOr={}, failOn={}, applyIfPlatform={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "PrintIdeal":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}(CountLeadingZerosV.*)+(\\s){2}===.*vector[A-Za-z]<J,2>)"
           - Failed comparison: [found] 0 > 0 [given]
           - No nodes matched!


The reason is that on PPC VectorCastL2X is not implemented for performance reasons. Like many vector instructions on PPC the performance for the long type variants is too bad.
The test needs to skip the IR matching on power.
Comments
Changeset: 77381318 Branch: master Author: David Briemann <dbriemann@openjdk.org> Date: 2025-11-17 06:49:12 +0000 URL: https://git.openjdk.org/jdk/commit/7738131835d08f47dd7c535b12bb7ea7b0ff0b90
17-11-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/28239 Date: 2025-11-11 15:32:03 +0000
11-11-2025