# HG changeset patch
# User shade
# Date 1463046367 -10800
# Node ID 1c1598b028749789bc042a0ccfdbb2d3847b2f33
# Parent  48614091c64be89cb7ad736711938b308874ab4b
8153792: EA: assert(ptn->as_LocalVar()->edge_count() > 0) failed: sanity when compiling compareAndExchange
Reviewed-by: kvn, psandoz

diff -r 48614091c64b -r 1c1598b02874 hotspot/src/share/vm/opto/escape.cpp
--- a/hotspot/src/share/vm/opto/escape.cpp	Thu May 12 08:25:42 2016 +0200
+++ b/hotspot/src/share/vm/opto/escape.cpp	Thu May 12 12:46:07 2016 +0300
@@ -721,7 +721,8 @@
         break;
       }
 #endif
-      if (opcode == Op_GetAndSetP || opcode == Op_GetAndSetN) {
+      if (opcode == Op_GetAndSetP || opcode == Op_GetAndSetN ||
+          opcode == Op_CompareAndExchangeN || opcode == Op_CompareAndExchangeP) {
         add_local_var_and_edge(n, PointsToNode::NoEscape, adr, NULL);
       }
       if (adr_type->isa_oopptr() ||