--- old/src/hotspot/share/opto/compile.cpp 2018-07-13 16:28:32.043666612 +0200 +++ new/src/hotspot/share/opto/compile.cpp 2018-07-13 16:28:31.763666616 +0200 @@ -4650,7 +4650,7 @@ Node* Compile::optimize_acmp(PhaseGVN* phase, Node* a, Node* b) { if (a->is_ValueType() || b->is_ValueType()) { // Return constant false because one operand is a non-null value type - return phase->intcon(1); + return new CmpINode(phase->intcon(0), phase->intcon(1)); // We need to return a new node } const TypeInstPtr* ta = phase->type(a)->isa_instptr(); const TypeInstPtr* tb = phase->type(b)->isa_instptr(); @@ -4663,7 +4663,7 @@ if ((ta != NULL && !TypePtr::NULL_PTR->higher_equal(ta)) || (tb != NULL && !TypePtr::NULL_PTR->higher_equal(tb))) { // One operand is never NULL, fold to constant false - return phase->intcon(1); + return new CmpINode(phase->intcon(0), phase->intcon(1)); // We need to return a new node } else { // Check if both operands are null by or'ing the oops a = phase->transform(new CastP2XNode(NULL, a));