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

CastIINode::Ideal() should be more generic

XMLWordPrintable

      JDK-8145322 introduced CastIINode::Ideal() doing the following optimization:
        // (CastII (AddI x const)) -> (AddI (CastII x) const)

      JDK-6675699 modified ConvI2LNode::Ideal() to also match:
       // ConvI2L(CastII(AddI(x, y))) to AddL(ConvI2L(CastII(x)), ConvI2L(CastII(y)))

      By making CastIINode::Ideal() more generic, the ConvI2L changes can be removed. Investigation also showed that the CastII optimization helps to clean up the graph and merge branches during loop optimizations. This could be improved by making it more generic.

            thartmann Tobias Hartmann
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: