< prev index next >

src/share/vm/opto/loopTransform.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -206,11 +206,11 @@
 // (inv2 - x) + inv1  =>  ( inv1 + inv2) - x
 // (inv2 - x) - inv1  =>  (-inv1 + inv2) - x
 // inv1 - (x + inv2)  =>  ( inv1 - inv2) - x
 //
 Node* IdealLoopTree::reassociate_add_sub(Node* n1, PhaseIdealLoop *phase) {
-  if (!n1->is_Add() && !n1->is_Sub() || n1->outcnt() == 0) return NULL;
+  if ((!n1->is_Add() && !n1->is_Sub()) || n1->outcnt() == 0) return NULL;
   if (is_invariant(n1)) return NULL;
   int inv1_idx = is_invariant_addition(n1, phase);
   if (!inv1_idx) return NULL;
   // Don't mess with add of constant (igvn moves them to expression tree root.)
   if (n1->is_Add() && n1->in(2)->is_Con()) return NULL;

@@ -727,12 +727,12 @@
   }
 
   // After unroll limit will be adjusted: new_limit = limit-stride.
   // Bailout if adjustment overflow.
   const TypeInt* limit_type = phase->_igvn.type(limit_n)->is_int();
-  if (stride_con > 0 && ((limit_type->_hi - stride_con) >= limit_type->_hi) ||
-      stride_con < 0 && ((limit_type->_lo - stride_con) <= limit_type->_lo))
+  if ((stride_con > 0 && ((limit_type->_hi - stride_con) >= limit_type->_hi)) ||
+      (stride_con < 0 && ((limit_type->_lo - stride_con) <= limit_type->_lo)))
     return false;  // overflow
 
   // Adjust body_size to determine if we unroll or not
   uint body_size = _body.size();
   // Key test to unroll loop in CRC32 java code

@@ -1514,12 +1514,12 @@
         assert(has_ctrl(opaq), "should have it");
         Node* opaq_ctrl = get_ctrl(opaq);
         limit = new Opaque2Node( C, limit );
         register_new_node( limit, opaq_ctrl );
       }
-      if (stride_con > 0 && (java_subtract(limit_type->_lo, stride_con) < limit_type->_lo) ||
-          stride_con < 0 && (java_subtract(limit_type->_hi, stride_con) > limit_type->_hi)) {
+      if ((stride_con > 0 && (java_subtract(limit_type->_lo, stride_con) < limit_type->_lo)) ||
+          (stride_con < 0 && (java_subtract(limit_type->_hi, stride_con) > limit_type->_hi))) {
         // No underflow.
         new_limit = new SubINode(limit, stride);
       } else {
         // (limit - stride) may underflow.
         // Clamp the adjustment value with MININT or MAXINT:
< prev index next >