hotspot/src/share/vm/opto/subnode.cpp
changeset 22911 ff49c48c887d
parent 22234 da823d78ad65
child 23528 8f1a7f5e8066
equal deleted inserted replaced
22910:88c3369b5967 22911:ff49c48c887d
  1124   // Change "bool tst (cmp con x)" into "bool ~tst (cmp x con)".
  1124   // Change "bool tst (cmp con x)" into "bool ~tst (cmp x con)".
  1125   // This moves the constant to the right.  Helps value-numbering.
  1125   // This moves the constant to the right.  Helps value-numbering.
  1126   Node *cmp = in(1);
  1126   Node *cmp = in(1);
  1127   if( !cmp->is_Sub() ) return NULL;
  1127   if( !cmp->is_Sub() ) return NULL;
  1128   int cop = cmp->Opcode();
  1128   int cop = cmp->Opcode();
  1129   if( cop == Op_FastLock || cop == Op_FastUnlock || cop == Op_FlagsProj) return NULL;
  1129   if( cop == Op_FastLock || cop == Op_FastUnlock) return NULL;
  1130   Node *cmp1 = cmp->in(1);
  1130   Node *cmp1 = cmp->in(1);
  1131   Node *cmp2 = cmp->in(2);
  1131   Node *cmp2 = cmp->in(2);
  1132   if( !cmp1 ) return NULL;
  1132   if( !cmp1 ) return NULL;
       
  1133 
       
  1134   if (_test._test == BoolTest::overflow || _test._test == BoolTest::no_overflow) {
       
  1135     return NULL;
       
  1136   }
  1133 
  1137 
  1134   // Constant on left?
  1138   // Constant on left?
  1135   Node *con = cmp1;
  1139   Node *con = cmp1;
  1136   uint op2 = cmp2->Opcode();
  1140   uint op2 = cmp2->Opcode();
  1137   // Move constants to the right of compare's to canonicalize.
  1141   // Move constants to the right of compare's to canonicalize.