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

Optimize Max and Min code generated for RCE

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      I looked on code generated for Range Check Elimination and see patters which could be optimized out

      1. MaxI compare the same node. It is not optimized because no Ideal optimization done for MaxI, it does not have Ideal() method. Note, MinI has Ideal() method.

       479 MaxI === _ 454 454 [[ 442 ]] !orig=[428]

      2. When several RCE optimizations done one after an other we can get very complex expressions which use combinations of MaxI and MinI:

      MaxI(MinI(X, Y), Y) and MinI(MaxI(X, Y), Y) could be optimized to Y

      MaxI(MinI(MaxI(X, Z), Y), Z) could be optimized to MaxI(MinI(X, Y), Z)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Imported:
                Indexed: