JDK-8034216 eagerly removes all castPP nodes after CCP phase. This can have performance implications, since NotNull type information might be lost. See earlier concerns:
May be we should investigate if the next performance statement about jvm98 is still true and solve it differently (in PhiNode::Ideal() for example):
// I tried to leave the CastPP's in. This makes the graph more accurate in
// some sense; we get to keep around the knowledge that an oop is not-null
// after some test. Alas, the CastPP's interfere with GVN (some values are
// the regular oop, some are the CastPP of the oop, all merge at Phi's which
// cannot collapse, etc). This cost us 10% on SpecJVM, even when I removed
// some of the more trivial cases in the optimizer. Removing more useless
// Phi's started allowing Loads to illegally float above null checks. I gave
// up on this approach. CNC 10/20/2000