Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8368861

[TEST] compiler/floatingpoint/ScalarFPtoIntCastTest.java expects x86 IR on non-x86 platforms

XMLWordPrintable

    • 26
    • b18
    • generic
    • generic

      The test compiler/floatingpoint/ScalarFPtoIntCastTest.java enforces x86 specific IR on non-x86 platforms if the feature `avx10_2` is not available.

      The test succeeds coincidentally on aarch64 and riscv because they have instruction forms with the same names as on x86 in their AD files.

      Example double2byte
      https://github.com/openjdk/jdk/blob/fdbba049a2491c591fc1a866e4707bf9aac50f17/test/hotspot/jtreg/compiler/floatingpoint/ScalarFPtoIntCastTest.java#L193-L206

      The test double2byte expects at least one IRNode.X86_SCONV_D2I if the feature `avx10_2` is not available.
      (https://github.com/openjdk/jdk/blob/fdbba049a2491c591fc1a866e4707bf9aac50f17/test/hotspot/jtreg/compiler/floatingpoint/ScalarFPtoIntCastTest.java#L195-L196)

      IRNode.X86_SCONV_D2I is defined as "convD2I_reg_reg"
      (https://github.com/openjdk/jdk/blob/fdbba049a2491c591fc1a866e4707bf9aac50f17/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java#L2700C43-L2700C58)

      Coincidentally the instruction forms on aarch64 and riscv are also named "convD2I_reg_reg". That's why double2byte succeeds on these platforms.
      It fails though on ppc64 because the corresponding instruction forms on ppc64 have different names.

            rrich Richard Reingruber
            rrich Richard Reingruber
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: