8170470: superword may miss reductions
authorroland
Wed, 30 Nov 2016 12:07:17 -0800
changeset 42622 0d672faf5c79
parent 42620 a6f74efe32aa
child 42623 84b7a7824600
8170470: superword may miss reductions Reviewed-by: kvn
hotspot/src/share/vm/opto/loopTransform.cpp
--- a/hotspot/src/share/vm/opto/loopTransform.cpp	Mon Nov 28 14:57:12 2016 +0100
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp	Wed Nov 30 12:07:17 2016 -0800
@@ -1742,7 +1742,7 @@
               // The result of the reduction must not be used in the loop
               for (DUIterator_Fast imax, i = def_node->fast_outs(imax); i < imax && ok; i++) {
                 Node* u = def_node->fast_out(i);
-                if (has_ctrl(u) && !loop->is_member(get_loop(get_ctrl(u)))) {
+                if (!loop->is_member(get_loop(ctrl_or_self(u)))) {
                   continue;
                 }
                 if (u == phi) {