changeset 58009:f2cefce4859b

8237086: assert(is_MachReturn()) running CTW with fix for JDK-8231291 Reviewed-by: kvn, vlivanov
author roland
date Tue, 14 Jan 2020 14:58:17 +0100
parents f41394559814
children 51fb05ec531d
files src/hotspot/share/opto/compile.cpp src/hotspot/share/opto/graphKit.cpp
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/opto/compile.cpp	Fri Feb 07 11:10:41 2020 +0000
+++ b/src/hotspot/share/opto/compile.cpp	Tue Jan 14 14:58:17 2020 +0100
@@ -2191,6 +2191,11 @@
         --i;
       }
     }
+    // Parsing may have added top inputs to the root node (Path
+    // leading to the Halt node proven dead). Make sure we get a
+    // chance to clean them up.
+    igvn._worklist.push(r);
+    igvn.optimize();
   }
 }
 
--- a/src/hotspot/share/opto/graphKit.cpp	Fri Feb 07 11:10:41 2020 +0000
+++ b/src/hotspot/share/opto/graphKit.cpp	Tue Jan 14 14:58:17 2020 +0100
@@ -1406,6 +1406,9 @@
 // opts so the test goes away and the compiled code doesn't execute a
 // useless check.
 Node* GraphKit::must_be_not_null(Node* value, bool do_replace_in_map) {
+  if (!TypePtr::NULL_PTR->higher_equal(_gvn.type(value))) {
+    return value;
+  }
   Node* chk = _gvn.transform(new CmpPNode(value, null()));
   Node *tst = _gvn.transform(new BoolNode(chk, BoolTest::ne));
   Node* opaq = _gvn.transform(new Opaque4Node(C, tst, intcon(1)));