Folding optimizations for Float16

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • tbd
    • Affects Version/s: 25
    • Component/s: hotspot
    • generic
    • generic

      The new C2 compiler support for Float16, or HalfFloat in the Ideal Graph, is missing some easy optimizations.
       - Conversion folding: sequences of ConvertHF2F and ConvertF2HF are not eliminated.
       - Float16 constants created with the idiom `Float16.valueOf(3.14f)` end up as a ConF in the ideal graph, preventing 16-bit subtraction in the case of `1 - (2 - f)` (see attached graph).

        1. graph.png
          38 kB
          Manuel Hässig

            Assignee:
            Unassigned
            Reporter:
            Manuel Hässig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: