With Valhalla, we see the following Phi/Mergemem pattern that is not folded and blocks optimizations:
287 MergeMem === _ 1 78 1 1 1 1 1 1 1 1 1 1 1 7 [[ 250 ]] { - - - - - - - - - - - N7:ConditionalTest$BoxInterface:NotNull:exact+12 *,iid=181 [narrow] } Memory: @BotPTR *+bot, idx=Bot; !jvms: ConditionalTest$BoxInterface::<init> @ bci:6 ConditionalTest$BoxInterface::from @ bci:10 ConditionalTest::test3 @ bci:18
215 MergeMem === _ 1 78 1 1 1 1 1 1 1 1 1 1 1 7 [[ 250 ]] { - - - - - - - - - - - N7:ConditionalTest$BoxInterface:NotNull:exact+12 *,iid=181 [narrow] } Memory: @BotPTR *+bot, idx=Bot; !jvms: ConditionalTest$BoxInterface::<init> @ bci:1 ConditionalTest$BoxInterface::from @ bci:10 ConditionalTest::test3 @ bci:18
250 Phi === 247 215 287 [[ 206 516 ]] #memory Memory: @BotPTR *+bot, idx=Bot; !orig=[428],[433] !jvms: ConditionalTest$BoxInterface::<init> @ bci:6 ConditionalTest$BoxInterface::from @ bci:10 ConditionalTest::test3 @ bci:18
WithJDK-8246603, I've enabled splitting of Phi's through mergemems if all inputs are mergemems. We need to revisit if this is correct.
TestLWorld::test109 should trigger this and IR verification fails without splitting phis through mergemems.
287 MergeMem === _ 1 78 1 1 1 1 1 1 1 1 1 1 1 7 [[ 250 ]] { - - - - - - - - - - - N7:ConditionalTest$BoxInterface:NotNull:exact+12 *,iid=181 [narrow] } Memory: @BotPTR *+bot, idx=Bot; !jvms: ConditionalTest$BoxInterface::<init> @ bci:6 ConditionalTest$BoxInterface::from @ bci:10 ConditionalTest::test3 @ bci:18
215 MergeMem === _ 1 78 1 1 1 1 1 1 1 1 1 1 1 7 [[ 250 ]] { - - - - - - - - - - - N7:ConditionalTest$BoxInterface:NotNull:exact+12 *,iid=181 [narrow] } Memory: @BotPTR *+bot, idx=Bot; !jvms: ConditionalTest$BoxInterface::<init> @ bci:1 ConditionalTest$BoxInterface::from @ bci:10 ConditionalTest::test3 @ bci:18
250 Phi === 247 215 287 [[ 206 516 ]] #memory Memory: @BotPTR *+bot, idx=Bot; !orig=[428],[433] !jvms: ConditionalTest$BoxInterface::<init> @ bci:6 ConditionalTest$BoxInterface::from @ bci:10 ConditionalTest::test3 @ bci:18
With
TestLWorld::test109 should trigger this and IR verification fails without splitting phis through mergemems.
- relates to
-
JDK-8255600 [lworld] C2 compilation fails with assert: modified node was not processed by IGVN.transform_old()
- Resolved
-
JDK-8246603 [lworld] C2 does not scalarize inline types wrapped into non-escaping box objects
- Resolved