// (CastII (AddI x const)) -> (AddI (CastII x) const)
// 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.