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

C2: Force CastX2P to be a two-address instruction

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 24
    • hotspot
    • aarch64
    • generic

      We found some extra register copy generated by CastX2P. See the discussion: https://github.com/openjdk/jdk/pull/16991#issuecomment-2206368740.

      The motivation comes from some cast operations like castPP. The difference for ADLC between castPP and CastX2P lies in that CastX2P always has different types for dst and src. We can force ADLC to generate an extra two_adr() for CastX2P like it does automatically for castPP, which could tell register allocator that the instruction needs the same register for dst and src.

            fgao Fei Gao
            fgao Fei Gao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: