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

Don't use Math.min/max intrinsic on x86

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      generic

      Description

      Math.min/max intrinsic unconditionally generates cmove instructions on x86 which may perform much worse than branch depending on probability of branches.
      We have code in PhaseIdealLoop::conditional_move() which takes into account branch's probability.
      I suggest to not use LibraryCallKit::inline_min_max() on CPUs which have good predictors (modern x86).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kvn Vladimir Kozlov
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: