RFR  (XS): 8179882: C2: Stale control info after cast node elimination during loop optimization pass
vladimir.kozlov at oracle.com
Wed May 24 22:36:52 UTC 2017
Yes, calling IGVN during loop opts is dangerous - we always have to
remember adjust loops info.
On 5/24/17 9:18 AM, Vladimir Ivanov wrote:
> There's cast elimination logic in
> PhaseIdealLoop::split_if_with_blocks_pre() which was introduced by
> The problem with it is that ConstraintCastNode::dominating_cast() relies
> on immediate control info (in(0)) which can get out of sync with what is
> cached in PhaseIdealLoop (get_ctrl()).
Should we fix this instead? It means somewhere we forgot to update loop
> The fix is to catch the case when dom_cast doesn't dominate n based on
> info from PhaseIdealLoop and update control info accordingly.
> Testing: manual (replayed problematic compilation & eyeballed the IR),
> JPRT, RBT (hs-tier0-comp, in progress).
> Best regards,
> Vladimir Ivanov
> PS: thanks to Roland for helping with the fix.
More information about the hotspot-compiler-dev