diff src/share/vm/opto/node.hpp @ 126:72f4a668df19

6625997: CastPP, CheckCastPP and Proj nodes are not dead loop safe Summary: EA and initialization optimizations could bypass these nodes. Reviewed-by: rasbold, never
author kvn
date Wed, 23 Apr 2008 19:09:16 -0700
parents d1a5218d7eaf
children a76240c8b133
line wrap: on
line diff
--- a/src/share/vm/opto/node.hpp	Wed Apr 23 13:57:14 2008 -0700
+++ b/src/share/vm/opto/node.hpp	Wed Apr 23 19:09:16 2008 -0700
@@ -741,8 +741,9 @@
   bool is_Goto() const { return (_flags & Flag_is_Goto) != 0; }
   // The data node which is safe to leave in dead loop during IGVN optimization.
   bool is_dead_loop_safe() const {
-    return is_Phi() || is_Proj() ||
-           (_flags & (Flag_is_dead_loop_safe | Flag_is_Con)) != 0;
+    return is_Phi() || (is_Proj() && in(0) == NULL) ||
+           ((_flags & (Flag_is_dead_loop_safe | Flag_is_Con)) != 0 &&
+            (!is_Proj() || !in(0)->is_Allocate()));
   }
 
   // is_Copy() returns copied edge index (0 or 1)