In playing with inlining heuristics, I discovered some missing unsupprted operations clauses in ShortArrayReplacer. We don't handle checkcast operations, but they also aren't in the unsupported list. As a quick fix, I'm adding them as unsupported operations in the containsUnsupportedUse method of this class (running pre-commit now).
However, it would be better to actually support them. If we enough information to scalar replace the array, it really seems like we should be able to evaluate instanceof and checkcast operations at compile time.
Witrh my tweak to the inlining heuristics, until we handle checkcast in ShortArrayReplacer we're missing a newly revealed opportunity to do short array scalar replacement in the java/security.VMAccessController. getContext. method.