8213779: Loop opts anti dependent store detection should ignore uncommon trap calls
authorroland
Tue, 13 Nov 2018 09:59:50 +0100
changeset 52604 6548ad72dff8
parent 52603 e89a4cbffba0
child 52605 b8c88c64abf0
8213779: Loop opts anti dependent store detection should ignore uncommon trap calls Reviewed-by: kvn
src/hotspot/share/opto/ifnode.cpp
src/hotspot/share/opto/loopnode.cpp
--- a/src/hotspot/share/opto/ifnode.cpp	Mon Nov 19 09:56:42 2018 +0000
+++ b/src/hotspot/share/opto/ifnode.cpp	Tue Nov 13 09:59:50 2018 +0100
@@ -1551,7 +1551,6 @@
   // Search up the dominator tree for an If with an identical test
   while (dom->Opcode() != op    ||  // Not same opcode?
          dom->in(1)    != in(1) ||  // Not same input 1?
-         (req() == 3 && dom->in(2) != in(2)) || // Not same input 2?
          prev_dom->in(0) != dom) {  // One path of test does not dominate?
     if (dist < 0) return NULL;
 
--- a/src/hotspot/share/opto/loopnode.cpp	Mon Nov 19 09:56:42 2018 +0000
+++ b/src/hotspot/share/opto/loopnode.cpp	Tue Nov 13 09:59:50 2018 +0100
@@ -3910,7 +3910,8 @@
     }
     while(worklist.size() != 0 && LCA != early) {
       Node* s = worklist.pop();
-      if (s->is_Load() || s->Opcode() == Op_SafePoint) {
+      if (s->is_Load() || s->Opcode() == Op_SafePoint ||
+          (s->is_CallStaticJava() && s->as_CallStaticJava()->uncommon_trap_request() != 0)) {
         continue;
       } else if (s->is_MergeMem()) {
         for (DUIterator_Fast imax, i = s->fast_outs(imax); i < imax; i++) {