src/hotspot/share/c1/c1_Optimizer.cpp
changeset 58273 08a5148e7c4e
parent 53806 3bd474c23ee4
child 59032 ad05ed6f2a77
--- a/src/hotspot/share/c1/c1_Optimizer.cpp	Mon Sep 23 14:39:11 2019 -0400
+++ b/src/hotspot/share/c1/c1_Optimizer.cpp	Mon Sep 23 14:49:04 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -868,7 +868,7 @@
       if (field->is_constant()) {
         ciConstant field_val = field->constant_value();
         BasicType field_type = field_val.basic_type();
-        if (field_type == T_OBJECT || field_type == T_ARRAY) {
+        if (is_reference_type(field_type)) {
           ciObject* obj_val = field_val.as_object();
           if (!obj_val->is_null_object()) {
             if (PrintNullCheckElimination) {