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

RISC-V: Tune costs for shuffles with no conversion

XMLWordPrintable

    • b05
    • riscv
    • linux

        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.

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

                Created:
                Updated:
                Resolved: