7089632: assert(machtmp->outcnt() == 1) failed: expected for a MachTemp
authorkvn
Tue, 13 Sep 2011 11:46:51 -0700
changeset 10549 76e964ccce5a
parent 10548 25c3d1aaade6
child 10550 0a3c7a00fdc1
7089632: assert(machtmp->outcnt() == 1) failed: expected for a MachTemp Summary: Replace assert with check to delete MachTemp nodes only when they are really dead. Reviewed-by: never
hotspot/src/share/vm/opto/postaloc.cpp
--- a/hotspot/src/share/vm/opto/postaloc.cpp	Mon Sep 12 13:51:40 2011 -0700
+++ b/hotspot/src/share/vm/opto/postaloc.cpp	Tue Sep 13 11:46:51 2011 -0700
@@ -100,10 +100,13 @@
     Node *tmp = NULL;
     for (uint i = 1; i < old->req(); i++) {
       if (old->in(i)->is_MachTemp()) {
+        // handle TEMP inputs
         Node* machtmp = old->in(i);
-        assert(machtmp->outcnt() == 1, "expected for a MachTemp");
-        blk_adjust += yank(machtmp, current_block, value, regnd);
-        machtmp->disconnect_inputs(NULL);
+        if (machtmp->outcnt() == 1) {
+          assert(machtmp->unique_out() == old, "sanity");
+          blk_adjust += yank(machtmp, current_block, value, regnd);
+          machtmp->disconnect_inputs(NULL);
+        }
       } else {
         assert(tmp == NULL, "can't handle more non MachTemp inputs");
         tmp = old->in(i);