This was found by fuzzing (hitting the assert "Missed optimization opportunity in PhaseCCP") when multiplying two longs resulting in a large number. The current logic in MulLNode::mul_ring() tries to cast the longs to doubles to check for overflows. However, when the product is too large (but still small enough to not overflow the 64-bit long range), we could get precision errors and wrongly bottom type even though there is no overflow. This should be fixed.
Moreover, the code in MulLNode::mul_ring() is very similar to MulINode::mul_ring() and should be shared.
Reproduce original fuzzer test:
$ java -XX:-TieredCompilation -XX:+StressCCP -XX:+StressIGVN -XX:StressSeed=1110788490 -Xcomp -XX:CompileOnly=Test Test.java
$ java -XX:-TieredCompilation -Xcomp -XX:CompileOnly=Reduced -XX:CompileCommand=dontinline,*::* Reduced.java