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

RISC-V: Tune costs for shuffles with no conversion

    XMLWordPrintable

Details

    • b05
    • riscv
    • linux

    Backports

      Description

        We have several nodes which provide floating point <-> integer representation conversions. Some of this nodes use fmv instructions, other use store or load instructions to convert value.
        On the RISC-V we prefer way using fmv instruction, because it faster, but now nodes, which use stack, selected.
        This happens because reg_reg and stack_reg operations matches similar nodes and the matcher does not take into account the cost of transferring a value from the stack back to the register.
        For example, we can have a look on IGV dumps for the simple code, which makes conversion like doubleToRawLongBits function. During matching MpveD2L machine independent node turn into MoveD2L_reg_stack node, and only after matching compiler adds BoundSpillCopy node to transfer converted value into the register.

        Attachments

          1. after_matching.png
            27 kB
            Ilya Gavrilin
          2. final_code.png
            32 kB
            Ilya Gavrilin
          3. machine_independent.png
            21 kB
            Ilya Gavrilin

          Issue Links

            Activity

              People

                igavrilin Ilya Gavrilin
                igavrilin Ilya Gavrilin
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: