--- a/src/hotspot/share/c1/c1_LIRGenerator.cpp Fri Dec 14 01:34:13 2018 +0100
+++ b/src/hotspot/share/c1/c1_LIRGenerator.cpp Fri Dec 14 09:59:08 2018 +0100
@@ -1113,7 +1113,7 @@
// no moves are created for phi functions at the begin of exception
// handlers, so assign operands manually here
for_each_phi_fun(block(), phi,
- operand_for_instruction(phi));
+ if (!phi->is_illegal()) { operand_for_instruction(phi); });
LIR_Opr thread_reg = getThreadPointer();
__ move_wide(new LIR_Address(thread_reg, in_bytes(JavaThread::exception_oop_offset()), T_OBJECT),